Easy Java Persistence(EJP)是一个易于注释和自由配置的持久性Java API,具有自动对象/关系映射(A-O/RM)、">自动处理所有关联和持久性跟踪的功能。
Easy Java Persistence 2.8该版本永久删除了许可限制和改变许可的算法。
EJP代码示范:
public static void main(String[] args) { // One of
many ways to connect to your database DatabaseManager dbm = DatabaseManager.getDatabaseManager("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/ejp_example"); dbm.saveObject(new Customer("Smith", "John")); Customer customer; if ((customer = dbm.loadObject(new Customer("Smith"))) != null) { customer.getSupport().add(new Support(...)); dbm.saveObject(customer); }
Collection<Customer> list = dbm.loadObjects(new ArrayList<Customer>(), Customer.class); ... }
软件信息:http://www.easierjava.com/webapp.ejw?c=ejp
下载地址:http://www.easierjava.com/downloads/ejp/ejp_2.8.zip