摘要:1.继承保存// C# & JAVA Employee e1 = new Employee("Michael", "1234", "michael", 101, "10/5/1975"); Manager m1 = new Manager("Sue", "9876", "sue", 102, "3/8/1982"); CasualEmployee c1 = new CasualEmployee("...
阅读全文
摘要:1.总的类图: 2.java类public static void main(String[] args) { ObjectContainer db = null; try{ db = Db4o.openFile("person.yap"); Address a1 = new Address("1 First Street", "San Jose", "USA")...
阅读全文
摘要:1.SODA Query Graphs ----a graph data structure 查找所有name为“Lincoln”的Person 2.SODA关键字 (1)查询关键字 (2)约束关键字 3.查询示例 (1)查询全部db = Db4o.openFile("customer.yap"); Query query=db.query(); query.cons...
阅读全文
摘要:1.NQ in java The Java version of db4o also has a Predicate class, but here you can write the query class as an anonymous inner class, which keeps the query definition inline with the code where the qu...
阅读全文
摘要:1.三种查询方式 (1)QBE--只能精确查找 (2)Simple Object Data Access(SODA)--DB4O的一套查询API (3)Native Queries(NQ)--调整查询以达到更高的查询速度 2.三种查询方式的对比 3.QBE的几种方式: (1)通过构造器指定参数Person template = new Person(); template...
阅读全文
摘要:1.查询所有 db = Db4o.openFile("customer.yap"); //查询所有customer Customer allcus=new Customer(); ObjectSet set=db.get(allcus); while(set.hasNext()){ System.out.println(((Customer)set.next()).getName()); ...
阅读全文
摘要:1.DB4O版本:6.4,ObjectManager版本7.2 因为之前创建数据库的时候同时进行检索,可以是这个原因经常导致database locked异常, 以为是DB4O版本的问题,之前是7.4,ObjectManager打不开yap文件。 现在这个版本可以了。估计是跟Server2003的文件的只读性有关。我后来该了文件只读属性, 现在可以了。估计跟DB4O版无关。 ...
阅读全文