Examples of ResultSetExtractor


Examples of de.willuhn.datasource.rmi.ResultSetExtractor

   * @return Liste der verfuegbaren Konto-Kategorien. Niemals NULL sondern hoechstens eine leere Liste.
   * @throws RemoteException
   */
  public static List<String> getGroups() throws RemoteException
  {
    return (List<String>) Settings.getDBService().execute("select kategorie from konto where kategorie is not null and kategorie != '' group by kategorie order by LOWER(kategorie)",null,new ResultSetExtractor()
    {
      /**
       * @see de.willuhn.datasource.rmi.ResultSetExtractor#extract(java.sql.ResultSet)
       */
      public Object extract(ResultSet rs) throws RemoteException, SQLException
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

      params.add(new java.sql.Date(DateUtil.startOfDay(to).getTime()));
      sql += " and datum <= ? ";
    }

    HBCIDBService service = Settings.getDBService();
    ResultSetExtractor rs = new ResultSetExtractor()
    {
      public Object extract(ResultSet rs) throws RemoteException, SQLException
      {
        if (rs.next())
          return new Double(rs.getDouble(1));
        return new Double(0.0d);
      }
    };

    Double d = (Double) service.execute(sql, params.toArray(), rs);
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

    query = "bpd." + kd.trim() + "." + query;

    // Wir sortieren aufsteigend, da es pro BPD-Set (z.Bsp. in "%UebPar%") mehrere
    // gibt (jeweils pro Segment-Version). HBCI4Java nimmt bei Geschaeftsvorfaellen
    // immer die hoechste verfuegbare Segment-Version. Also machen wir das hier auch
    Settings.getDBService().execute("select name,content from property where name like ? order by name",new String[]{query},new ResultSetExtractor()
    {
      public Object extract(ResultSet rs) throws RemoteException, SQLException
      {
        while (rs.next())
        {
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

          {
            query += " where konto_id in (select id from konto where kategorie = ?)";
            params = new String[]{(String) o};
          }
         
          date = (Date) Settings.getDBService().execute(query,params,new ResultSetExtractor() {
            public Object extract(ResultSet rs) throws RemoteException, SQLException
            {
              if (!rs.next())
                return null;
              return rs.getDate(1);
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

  public SelectInput getKategorie() throws RemoteException
  {
    if (this.kategorie != null)
      return this.kategorie;
   
    List<String> list = (List<String>) Settings.getDBService().execute("select kategorie from empfaenger where kategorie is not null and kategorie != '' group by kategorie order by LOWER(kategorie)",null,new ResultSetExtractor()
    {
      /**
       * @see de.willuhn.datasource.rmi.ResultSetExtractor#extract(java.sql.ResultSet)
       */
      public Object extract(ResultSet rs) throws RemoteException, SQLException
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

      return 0;

    String sql = "select count(id) from umsatz where konto_id = " + this.getID();

    HBCIDBService service = (HBCIDBService) this.getService();
    ResultSetExtractor rs = new ResultSetExtractor()
    {
      public Object extract(ResultSet rs) throws RemoteException, SQLException
      {
        if (rs.next())
          return new Integer(rs.getInt(1));
        return new Integer(0);
      }
    };

    Integer i = (Integer) service.execute(sql, new Object[0], rs);
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

  /**
   * @see de.willuhn.jameica.reminder.ReminderStorageProvider#getUUIDs()
   */
  public String[] getUUIDs() throws Exception
  {
    return (String[]) Settings.getDBService().execute("select uuid from reminder",null,new ResultSetExtractor() {
      public Object extract(ResultSet rs) throws RemoteException, SQLException
      {
        List<String> list = new ArrayList<String>();
        while (rs.next())
        {
View Full Code Here

Examples of de.willuhn.datasource.rmi.ResultSetExtractor

        Logger.info("copying data");
        myProvider.getProgressMonitor().log(i18n.tr("Kopiere Daten"));
        service = new HBCIDBServiceImpl();
        service.start();
       
        List<Line> lines = (List<Line>) service.execute("select * from verwendungszweck order by typ,auftrag_id,id",null,new ResultSetExtractor() {
          public Object extract(ResultSet rs) throws RemoteException, SQLException
          {
            List<Line> result = new ArrayList<Line>();
            while (rs.next())
            {
View Full Code Here

Examples of org.springframework.jdbc.core.ResultSetExtractor

    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(mockDataSource);
    Map params = new HashMap();
    params.put("id", new SqlParameterValue(Types.DECIMAL, new Integer(1)));
    params.put("country", "UK");
    Customer cust = (Customer) jt.query(SELECT_NAMED_PARAMETERS, params, new ResultSetExtractor() {
      public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
        rs.next();
        Customer cust = new Customer();
        cust.setId(rs.getInt(COLUMN_NAMES[0]));
        cust.setForename(rs.getString(COLUMN_NAMES[1]));
View Full Code Here

Examples of org.springframework.jdbc.core.ResultSetExtractor

        injector.getInstance(GroupService.class);
    }

    @Test(expected = com.google.inject.ConfigurationException.class)
    public void doesNotBindOthers() {
        ResultSetExtractor personService1 = injector.getInstance(ResultSetExtractor.class);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.