Java持久层框架 Easy Java Persistence 2.6 发布

fmms 13年前
     <p><span style="line-height:20px;font-family:微软雅黑,Verdana,Simsun,sans-serif;color:#333333;">EJP是一个强大并且易于使用的关系数据库持久化Java API。它拥有以下特性:</span></p>    <ul type="disc">     <li>Automatic object-relational mapping (A-O/RM)</li>     <li>Automatic tracking of object persistence</li>     <li>Mapping is automatic; there is no configuration, or annotation required</li>     <li>All associations are automatic</li>     <li>Handles associations with single instance, arrays, and collections</li>     <li>Automatic support for join inheritance</li>     <li>Support for single table inheritance and concrete table inheritance</li>     <li>Objects are isolated from database changes, and vice versa</li>     <li>Full Support for MySQL, DB2, Oracle, Derby, HSQL, PostgreSQL, H2, and more</li>     <li>Object-oriented queries, inserts, updates, deletes and more</li>     <li>Intermix objects with SQL, and use object properties in SQL fragments</li>     <li>Full support for batch updates</li>     <li>Full support for database transactions</li>     <li>Supports any JDBC source including DriverManager, JNDI, and DataSource</li>     <li>Support for third-party connection pooling (DBCP, C3PO, etc.)</li>     <li>No SQL required for queries, inserts, updates, deletes</li>     <li>Uses JDBC with access to underlying connection, statement and result set</li>     <li>Implements ListIterator and Iterable for object-oriented iteration through data</li>     <li>Multiple utilities for loading data into collections and maps</li>     <li>All JDBC functionality is supported</li>    </ul>    <p><span style="line-height:20px;font-family:微软雅黑, Verdana, Simsun, sans-serif;color:#333333;"><br /> </span><span style="line-height:20px;font-family:微软雅黑, Verdana, Simsun, sans-serif;color:#333333;">Easy Java Persistence 2.6 发布,更新如下:</span></p>    <blockquote>     <p><span style="line-height:20px;font-family:微软雅黑, Verdana, Simsun, sans-serif;color:#333333;">A problem with schema oriented databases (PostgreSQL, Oracle, etc.) where the users default schema was being used instead of the requested schema was fixed. nullValuesToIncludeInSaves was deprecated, as null values will now always be saved. setMetaDataLimits was replaced with setCatalogPattern and setSchemaPattern. Another alternative for handling caching was added.</span></p>    </blockquote>    <p style="padding-bottom:0px;line-height:20px;font-family:微软雅黑, Verdana, Simsun, sans-serif;margin-bottom:10px;color:#333333;">EJP的主要特性包括:<br style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;padding-top:0px;" /> <br style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;padding-top:0px;" />   1、对象/关系(object/relational)自动映射(A-O/RM) <br style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;padding-top:0px;" />   2、自动处理所有关联 <br style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;padding-top:0px;" />   3、自动持久化跟踪 <br style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;padding-top:0px;" /> <br style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;padding-top:0px;" /> EJP不需要映射注释或XML配置,并且不需要继承任何类或实现任何接口。EJP只用到了Plain Old Java Objects (POJOs)对象。到目前为止,EJP是Java开源中最简单的持久化API。</p>    <p style="padding-bottom:0px;line-height:20px;font-family:微软雅黑, Verdana, Simsun, sans-serif;margin-bottom:10px;color:#333333;">示例代码:</p>    <p style="padding-bottom:0px;line-height:20px;font-family:微软雅黑, Verdana, Simsun, sans-serif;margin-bottom:10px;color:#333333;"><span style="padding-bottom:0px;line-height:normal;margin:0px;padding-left:0px;padding-right:0px;font-family:Verdana, Arial, sans-serif;color:#222222;font-size:15px;padding-top:0px;"> </span></p>    <pre class="brush:java; toolbar: true; auto-links: false;">   public static void main(String[] args)        {          DatabaseManager dbm = DatabaseManager.getDatabaseManager(...);                 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 = new ArrayList<Customer>();                 list = dbm.loadObjects(list, Customer.class);          ...        }</pre>    <p></p> 项目地址:    <a href="/misc/goto?guid=4958195823772308723" target="_blank">http://www.easierjava.com/webapp.ejw?c=ejp</a>