Examples of common()


Examples of com.db4o.config.EmbeddedConfiguration.common()

    configuration.common().objectClass(ScanAlert.class).objectField("key").indexed(true);
    configuration.common().objectClass(ScanAlert.class).objectField("resource").indexed(true);
    configuration.common().objectClass(ScanAlert.class).objectField("requestId").indexed(true);
    configuration.common().objectClass(Tag.class).objectField("name").indexed(true);

    configuration.common().weakReferences(false);
   
    if(DIAGNOSTICS_ENABLED) {
      configuration.common().diagnostic().addListener(new DiagnosticToConsole());
    }
    if(DEBUG_OUTPUT_ENABLED) {
View Full Code Here

Examples of com.db4o.config.EmbeddedConfiguration.common()

    configuration.common().objectClass(Tag.class).objectField("name").indexed(true);

    configuration.common().weakReferences(false);
   
    if(DIAGNOSTICS_ENABLED) {
      configuration.common().diagnostic().addListener(new DiagnosticToConsole());
    }
    if(DEBUG_OUTPUT_ENABLED) {
      configuration.common().messageLevel(DEBUG_OUTPUT_LEVEL);
    }
View Full Code Here

Examples of com.db4o.config.EmbeddedConfiguration.common()

   
    if(DIAGNOSTICS_ENABLED) {
      configuration.common().diagnostic().addListener(new DiagnosticToConsole());
    }
    if(DEBUG_OUTPUT_ENABLED) {
      configuration.common().messageLevel(DEBUG_OUTPUT_LEVEL);
    }

    if(LAZY_EVALUATION) {
      configuration.common().queries().evaluationMode(QueryEvaluationMode.LAZY);
    }
View Full Code Here

Examples of com.db4o.config.EmbeddedConfiguration.common()

    if(DEBUG_OUTPUT_ENABLED) {
      configuration.common().messageLevel(DEBUG_OUTPUT_LEVEL);
    }

    if(LAZY_EVALUATION) {
      configuration.common().queries().evaluationMode(QueryEvaluationMode.LAZY);
    }
    return configuration;

  }
View Full Code Here

Examples of com.db4o.cs.config.ClientConfiguration.common()

   * @param Model to save
   */
  public <T> boolean save(T aModel){
    // Please see Wiki for more information on the ServerConfiguration.
    ClientConfiguration config = Db4oClientServer.newClientConfiguration();
    config.common().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));

    theDB.store(aModel);
    System.out.println("Stored " + aModel);
    logger.log(Level.FINE, "Saving model [" + aModel + "]");
    theDB.commit();
View Full Code Here

Examples of com.db4o.cs.config.ClientConfiguration.common()

   * @param Model to save
   */
  public <T> boolean save(T aModel, Project aProject){
    // Please see Wiki for more information on the ServerConfiguration.
    ClientConfiguration config = Db4oClientServer.newClientConfiguration();
    config.common().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));

    ((Model) aModel).setProject(aProject); //Sets the model's project to the given project
    theDB.store(aModel);
    System.out.println("Stored " + aModel);
    logger.log(Level.FINE, "Saving model [" + aModel + "]");
View Full Code Here

Examples of com.db4o.cs.config.ClientConfiguration.common()

     *  aFieldName - this should be the suffix of the getter. So for getID you would make this field be "ID"
     */

    // Please see Wiki for more information on the ServerConfiguration.
    ClientConfiguration config = Db4oClientServer.newClientConfiguration();
    config.common().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));

    logger.log(Level.FINE, "Attempting Database Retrieve...");

    Method[] allMethods = anObjectQueried.getMethods();
    Method methodToBeSaved = null;
View Full Code Here

Examples of com.db4o.cs.config.ClientConfiguration.common()

     *  aFieldName - this should be the suffix of the getter. So for getID you would make this field be "ID"
     */

    // Please see Wiki for more information on the ServerConfiguration.
    ClientConfiguration config = Db4oClientServer.newClientConfiguration();
    config.common().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));

    logger.log(Level.FINE, "Attempting Database Retrieve...");
    Method[] allMethods = anObjectQueried.getMethods();
    Method methodToBeSaved = null;
    for(Method m: allMethods){//Cycles through all of the methods in the class anObjectQueried
View Full Code Here

Examples of com.db4o.cs.config.ClientConfiguration.common()

   * @return a List of all of the objects of the given class
   */
  public <T> List<T> retrieveAll(T aSample){
    // Please see Wiki for more information on the ServerConfiguration.
    ClientConfiguration config = Db4oClientServer.newClientConfiguration();
    config.common().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));

    List<T> result = theDB.queryByExample(aSample.getClass());
    System.out.println("retrievedAll: "+result);
    theDB.commit();

View Full Code Here

Examples of com.db4o.cs.config.ClientConfiguration.common()

   * @return a List of all of the objects of the given class
   */
  public <T> List<Model> retrieveAll(T aSample, Project aProject){
    // Please see Wiki for more information on the ServerConfiguration.
    ClientConfiguration config = Db4oClientServer.newClientConfiguration();
    config.common().reflectWith(new JdkReflector(Thread.currentThread().getContextClassLoader()));

    ArrayList<Model> result = new ArrayList<Model>();
    List<Model> allResults = theDB.queryByExample(aSample.getClass());
    for(Model theModel : allResults) {
      if(theModel.getProject() != null &&
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.