Package com.db4o.config

Examples of com.db4o.config.ObjectClass


    config.objectClass(Preference.class).objectField("fKey").indexed(true); //$NON-NLS-1$
    return config;
  }

  private void configureAbstractEntity(Configuration config) {
    ObjectClass abstractEntityClass = config.objectClass(AbstractEntity.class);
    ObjectField idField = abstractEntityClass.objectField("fId");
    idField.indexed(true); //$NON-NLS-1$
    idField.cascadeOnActivate(true); //$NON-NLS-1$
    abstractEntityClass.objectField("fProperties").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here


    idField.cascadeOnActivate(true); //$NON-NLS-1$
    abstractEntityClass.objectField("fProperties").cascadeOnUpdate(true); //$NON-NLS-1$
  }

  private void configureSearchMark(Configuration config) {
    ObjectClass oc = config.objectClass(SearchMark.class);
    oc.objectField("fSearchConditions").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

    ObjectClass oc = config.objectClass(SearchMark.class);
    oc.objectField("fSearchConditions").cascadeOnUpdate(true); //$NON-NLS-1$
  }

  private void configureFolder(Configuration config) {
    ObjectClass oc = config.objectClass(Folder.class);
    oc.objectField("fChildren").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

    ObjectClass oc = config.objectClass(Folder.class);
    oc.objectField("fChildren").cascadeOnUpdate(true); //$NON-NLS-1$
  }

  private void configureNews(Configuration config) {
    ObjectClass oc = config.objectClass(News.class);

    oc.objectField("fTitle").cascadeOnActivate(true); //$NON-NLS-1$

    /* Indexes */
    oc.objectField("fLinkText").indexed(true); //$NON-NLS-1$
    oc.objectField("fGuidValue").indexed(true); //$NON-NLS-1$
    oc.objectField("fFeedLink").indexed(true); //$NON-NLS-1$
    oc.objectField("fStateOrdinal").indexed(true); //$NON-NLS-1$
  }
View Full Code Here

    oc.objectField("fFeedLink").indexed(true); //$NON-NLS-1$
    oc.objectField("fStateOrdinal").indexed(true); //$NON-NLS-1$
  }

  private void configureFeed(Configuration config)  {
    ObjectClass oc = config.objectClass(Feed.class);

    ObjectField linkText = oc.objectField("fLinkText"); //$NON-NLS-1$
    linkText.indexed(true);
    linkText.cascadeOnActivate(true);

    oc.objectField("fTitle").cascadeOnActivate(true); //$NON-NLS-1$
  }
View Full Code Here

    globalConfig.objectClass(Preference.class).cascadeOnDelete(true);
    globalConfig.objectClass(Preference.class).objectField("fKey").indexed(true); //$NON-NLS-1$
  }
 
  private void configureSearchMark() {
    ObjectClass oc = Db4o.configure().objectClass(SearchMark.class);
    oc.objectField("fSearchConditions").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

    ObjectClass oc = Db4o.configure().objectClass(SearchMark.class);
    oc.objectField("fSearchConditions").cascadeOnUpdate(true); //$NON-NLS-1$
  }
 
  private void configureFolder() {
    ObjectClass oc = Db4o.configure().objectClass(Folder.class);
    oc.objectField("fFolders").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fMarks").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

    oc.objectField("fFolders").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fMarks").cascadeOnUpdate(true); //$NON-NLS-1$
  }

  private void configureNews() {
    ObjectClass oc = Db4o.configure().objectClass(News.class);
//    oc.maximumActivationDepth(1);
//    oc.minimumActivationDepth(0);

    oc.objectField("fTitle").cascadeOnActivate(true); //$NON-NLS-1$
   
    /* Indexes */
    oc.objectField("fLinkText").indexed(true); //$NON-NLS-1$
    oc.objectField("fGuidValue").indexed(true); //$NON-NLS-1$
   
    oc.objectField("fAttachments").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fAuthor").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fCategories").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fSource").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fLabel").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

    oc.objectField("fSource").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fLabel").cascadeOnUpdate(true); //$NON-NLS-1$
  }

  private void configureFeed() {
    ObjectClass oc = Db4o.configure().objectClass(Feed.class);
//    oc.maximumActivationDepth(1);
//    oc.minimumActivationDepth(1);
   
    ObjectField linkText = oc.objectField("fLinkText"); //$NON-NLS-1$
    linkText.indexed(true);
    linkText.cascadeOnActivate(true);
   
    oc.objectField("fTitle").cascadeOnActivate(true); //$NON-NLS-1$
   
    /* Cascade on update */
    oc.objectField("fAuthor").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fImage").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fAuthor").cascadeOnUpdate(true); //$NON-NLS-1$
    oc.objectField("fCategories").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

    String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$
    return javaVendor != null && javaVendor.contains("IBM") && javaVersion != null && javaVersion.contains("1.6"); //$NON-NLS-1$ //$NON-NLS-2$
  }

  private static void configureAbstractEntity(Configuration config) {
    ObjectClass abstractEntityClass = config.objectClass(AbstractEntity.class);
    ObjectField idField = abstractEntityClass.objectField("fId"); //$NON-NLS-1$
    idField.indexed(true);
    idField.cascadeOnActivate(true);
    abstractEntityClass.objectField("fProperties").cascadeOnUpdate(true); //$NON-NLS-1$
  }
View Full Code Here

TOP

Related Classes of com.db4o.config.ObjectClass

Copyright © 2018 www.massapicom. 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.