Examples of queryByExample()


Examples of com.db4o.ObjectContainer.queryByExample()

  public void toXML() {
    EmbeddedConfiguration config = Db4oEmbedded.newConfiguration();
    config.common().activationDepth(Integer.MAX_VALUE);
    ObjectContainer db4o = Db4oEmbedded.openFile(config, databaseFile);
    new XStreamFile(xstreamFile).write(db4o.queryByExample(null));
    db4o.close();
  }

  public void fromXML() {
    ObjectContainer db4o = Db4oEmbedded.openFile(databaseFile);
View Full Code Here

Examples of com.db4o.ObjectContainer.queryByExample()

    }
    // DUMP DATABASE CONTENTS
    if(logDEBUG && database != null) {
    try {
    System.err.println("DUMPING DATABASE CONTENTS:");
    ObjectSet<Object> contents = database.queryByExample(new Object());
    Map<String,Integer> map = new HashMap<String, Integer>();
    for(Object o: contents) {
      String name = o.getClass().getName();
      if((map.get(name)) != null) {
        map.put(name, map.get(name)+1);
View Full Code Here

Examples of com.db4o.ObjectContainer.queryByExample()

 

  private static void query() {
    ObjectContainer db = Db4o.openFile(DBFILENAME);
    try {
      ObjectSet set = db.queryByExample(TestDummy.class);
      if (ITERATIONS != set.size()) {
        System.err.println("Expected: " + ITERATIONS + ", actual: " + set.size());
      }
    } finally {
      db.close();
View Full Code Here

Examples of com.mobixess.jodb.tests.QueryTests.queryByExample()

     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws Exception {
        QueryTests queryTests = new ServerClientQueryTest();
        queryTests.queryByExample(true);
        queryTests.sortingTest();
        queryTests.queryByExample(false);
        queryTests.stringFieldQueryCompare(true);
        queryTests.stringFieldQueryCompare(false);
        queryTests.primitiveFieldsQuery(true);
View Full Code Here

Examples of com.mobixess.jodb.tests.QueryTests.queryByExample()

     */
    public static void main(String[] args) throws Exception {
        QueryTests queryTests = new ServerClientQueryTest();
        queryTests.queryByExample(true);
        queryTests.sortingTest();
        queryTests.queryByExample(false);
        queryTests.stringFieldQueryCompare(true);
        queryTests.stringFieldQueryCompare(false);
        queryTests.primitiveFieldsQuery(true);
        queryTests.primitiveFieldsQuery(false);
        queryTests.classTypeConstraints(true);
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.