首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > Android支持继承的ORM框架

Android支持继承的ORM框架

  • 资源大小:44.80 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: android orm 框架 支持 继承

资 源 简 介

Compot is a ORM framework for Adnroid which supports inheritance. It uses annotations to define entities and APT for automatic entity scanning. Latest version: beta-0.1 supports: * Automatic table creation form entity classes: * Entity Inheritance * Compile time static model generation * Insert, Delete, Update * Query by filtering object keys Compot lets you start with your application logic right away. No boilerplate code! ``` @Entity public class Person { @Id Long id; @MaxLength(value = 128) String name; int age; @Foreign(entity = Faculty.class, property = "id") Long facultyId; // getters and setters ... } @Entity public class Student extends Person { @Id Long id; @Unique @MaxLength(value = 128) String studentNumber; boolean enrolled; // getters and setters ... } ... CompotFactory compotFactory = new CompotFactory(myAndroidContext, "myDatabaseName"); Compot compot = compotFactory.getCompot
VIP VIP
0.231484s