Examples of DBService


Examples of de.willuhn.datasource.rmi.DBService

  private DBReminder getDBReminder(String uuid) throws Exception
  {
    if (StringUtils.trimToNull(uuid) == null)
      throw new JameicaException("no uuid given");
   
    DBService service = Settings.getDBService();
    DBIterator i = service.createList(DBReminder.class);
    i.addFilter("uuid = ?",uuid);
    if (i.hasNext())
      return (DBReminder) i.next();
   
    return null;
View Full Code Here

Examples of de.willuhn.datasource.rmi.DBService

   * @see de.willuhn.jameica.hbci.io.AbstractImporter#importObject(java.lang.Object, int)
   */
  @Override
  void importObject(Object o, int idx, Map ctx) throws Exception
  {
    DBService service = de.willuhn.jameica.hbci.Settings.getDBService();

    Properties prop = (Properties) o;

    SepaSammelUeberweisung ueb = (SepaSammelUeberweisung) ctx.get("ueb");
   
    // erster Datensatz. Wir erstellen den Sammelauftrag
    if (ueb == null)
    {
      ueb = (SepaSammelUeberweisung) service.createObject(SepaSammelUeberweisung.class,null);
      ueb.setBezeichnung(i18n.tr("SEPA-Sammel�berweisung vom {0}",HBCI.LONGDATEFORMAT.format(new Date())));
      ueb.setKonto(this.findKonto(prop.getProperty(ISEPAParser.Names.SRC_IBAN.getValue())));
      ueb.setPmtInfId(StringUtils.trimToNull(prop.getProperty(ISEPAParser.Names.PMTINFID.getValue())));
     
      String date = StringUtils.trimToNull(prop.getProperty(ISEPAParser.Names.DATE.getValue()));
View Full Code Here

Examples of de.willuhn.datasource.rmi.DBService

   * @see de.willuhn.jameica.hbci.io.AbstractImporter#importObject(java.lang.Object, int)
   */
  @Override
  void importObject(Object o, int idx, Map ctx) throws Exception
  {
    DBService service = de.willuhn.jameica.hbci.Settings.getDBService();

    Properties prop = (Properties) o;

    SepaSammelLastschrift ueb = (SepaSammelLastschrift) ctx.get("ueb");
   
    // erster Datensatz. Wir erstellen den Sammelauftrag
    if (ueb == null)
    {
      ueb = (SepaSammelLastschrift) service.createObject(SepaSammelLastschrift.class,null);
      ueb.setSequenceType(SepaLastSequenceType.valueOf(prop.getProperty(ISEPAParser.Names.SEQUENCETYPE.getValue())));
      ueb.setType(SepaLastType.valueOf(prop.getProperty(ISEPAParser.Names.LAST_TYPE.getValue())));
      ueb.setBezeichnung(i18n.tr("{0} {1} vom {2}",ueb.getSequenceType().getDescription(),ueb.getType().getDescription(), HBCI.LONGDATEFORMAT.format(new Date())));
      ueb.setKonto(this.findKonto(prop.getProperty(ISEPAParser.Names.SRC_IBAN.getValue())));
      ueb.setPmtInfId(StringUtils.trimToNull(prop.getProperty(ISEPAParser.Names.PMTINFID.getValue())));
View Full Code Here

Examples of de.willuhn.datasource.rmi.DBService

    ReminderMessage msg           = (ReminderMessage) message;
    Map<String,Serializable> data = (Map<String,Serializable>) msg.getData();
    Date termin                   = msg.getDate();

    MultipleClassLoader loader = Application.getPluginLoader().getManifest(HBCI.class).getClassLoader();
    DBService service          = Settings.getDBService();

    // 1. der zu duplizierende Auftrag
    Class type = loader.load((String) data.get("order.class"));
    String id  = (String) data.get("order.id");

    Logger.debug("checking, if order " + type.getSimpleName() + ":" + id + " has to be cloned for " + termin);

    // 2. Checken, ob der Auftrag bereits erzeugt wurde. Das kann z.Bsp. der
    //    Fall sein, wenn mehrere Hibiscus-Instanzen die gleiche DB verwenden.
    //    Dann erfolgt das Duplizieren durch den ersten Client, der den Termin
    //    ausfuehrt. Wir suchen also nach einem Auftrag, der auf dem zu duplizierenden
    //    Auftrag basiert und den gesuchten Termin besitzt
    DBIterator list = service.createList(type);
    list.addFilter("termin = ?",termin);
    while (list.hasNext())
    {
      HibiscusDBObject t = (HibiscusDBObject) list.next();
      // Wenn der Auftrag in den Meta-Daten die ID des gesuchten Auftrages hat,
      // dann ist er bereits erzeugt worden.
      String from = MetaKey.REMINDER_TEMPLATE.get(t);
      if (from != null && from.equals(id))
      {
        Logger.debug("already cloned by " + MetaKey.REMINDER_CREATOR.get(t));
        return;
      }
    }

    // 3. Auftrag laden
    Duplicatable template = (Duplicatable) service.createObject(type,id);

    // 4. Auftrag clonen und speichern
    HibiscusDBObject order = (HibiscusDBObject) template.duplicate();
    String hostname        = Application.getCallback().getHostname();
View Full Code Here

Examples of dovetaildb.dbservice.DbService

        });
        FsTransactionMapper mapper = new FsTransactionMapper(subDbServiceHome, sync);
        b.setTxnMapper(mapper);
        // when creating a new BagIndexBridge, issue an empty commit to get a valid initial txn entry
        b.commit(mapper.getHighestTxnId(), new HashMap<String, ApiBuffer>());
        DbService dbService = b;
        dbService = new ScoringDbService(dbService);
        return dbService;
      }
    };
    RebuildingDbService rebuilding = new RebuildingDbService(dataRoot, factory);
View Full Code Here

Examples of dovetaildb.dbservice.DbService

   
  }

  @Test
  public void testAll() throws Exception {
    DbService db = createDbService();
   
    ApiService api1 = createApi(db);
    ApiService api2 = createApi(db);
   
    checkEmpty(api1);
View Full Code Here

Examples of dovetaildb.dbservice.DbService

 
  protected void betweenIters(DbService dbService, ApiService apiService) {
  }
 
  public void testComplex() {
    DbService db = createDbService();
    ApiService api = createApi(db);
    //for(int numIters : new int[]{2,500,2000}) {  // got a failure once with this set, might be useful too
    for(int numIters : new int[]{2,5,20,50,200,500,2000}) {
      System.out.println();
      System.out.println("testComplex numIters = "+numIters);
View Full Code Here

Examples of dovetaildb.dbservice.DbService

    }
   
  }
 
  public void XXXtestAll() throws Exception { // TODO re-enable
    DbService db = createDbService();
    ApiService api1 = createApi(db);
    ApiService api2 = createApi(db);
   
    checkEmpty(api1);
   
View Full Code Here

Examples of xbird.server.services.DbService

    /**
     * Core services are: <code>DbService</code>, and <code>XQEngineService</code>.
     */
    private void registCoreServices() {
        services.addService(new DbService());
    }
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.