G N A - J O R M
Features
- There is no configuration needed (no properties or ini-files ). Keep everthing inside your java-code.
If you want to, you can provide a system.ini-file to pass properties like db.name, db.password , . . .
- You need no mapping declarations or mapping tools. The mapping-informations are calculated at
runtime. If you need special mappings or namings, you can provide a mapping.xml-file with only particular
mappings. The Enhancer-Tool generates a default mapping.xml for you that can be adjusted and stripped down
to your requirement.
- There is no technical BaseClass to inherit from, just implement a tiny Marker-Interface with zero methods.
- It supports transactions so you can commit() or rollback() whole units of work.
- It supports multithreaded environments.
- Objects can be detached from a session and again attached to another Session. This is typical
client/server turn-around without any extra transformation into data-objects or value-objects. You can stream
(serialize) your Pojos to the client and back to server (detached objects will never access the database).
- It saves/updates whole object-graphs (object-trees). You have to attach/detach only the root-object
to a session. All linked objects are attached/detached automaticaly.
- dirty-management knows wich objetcs are modified (via bytecode-enhancements) since loadtime, and writes all
the necessary objects to the database at commit time, but not the untouched objects.
- It supports transparent inheritance and inhomogeneus collections. When yo start a query with a
base-class-target you will receive a inhomogenius collection of all derived classes (no proxy-casting
problem).
- It supports lazy loading of linked objects, by using Hollowobjects (no Proxys!). So only objects that
are realy needed, are loaded into the VM.
- It can save and load recursive linked objects (parent -> child -> parent) correctly.
- Use Sequenzes as simple like this : long num = DB.session().getSequenzeNext("num-genarator")
- All tables and schemas are initialized on the fly. No database initialization is needed, you just define one
empty maintenance database for connection purpose.
- The Schema-Checker Tool will help you keep your database compatible to your classes. It alters the tables
in the database in a defensive manner . It will never delete any columns or data. But you can rename or delete
columns manually. For refactoring, you can even rename persistent classes .
- It has a build in catalog-management, so you can keep the data of different customers clearly seperated in
different database-schemas. A Session is allways connected to a catalog.
- The build in session-pooling will keep your number of db-connections limmited.
- You can load collections of objects by using handy OO-Path-Querys
example: getList( new Query(Adress.class, "country->currency->isoCode", Query.LIKE, "EUR")
- It has a OidIterator wich enables you to traverse big amounts of objects ( > 1.000.000 ) without
OutOfMemmoryException.
- It supports linked objects via Java-Interfaces transparently.
- It supports primitives in persistent Lists and Maps.
- You can use a very fast 'PersistentListSmal' a List-Implemantation for smaller Lists (<1000 entries).
- Use embeded Objects to melt smaler objects into the parent-tables. Therefor you have to implement a
very simple Interface with two methods String writeDBString() and
void readDBString(String str)
- Minimum dependencies to other jars at runtime, only jdbc-connector (and jdom.jar if you use mapping.xml).
At compile-time the enhancer tool needs java-assist.jar .
Limitations
- It only supports MySQL at the moment (but it is prepared to support more database-flawours).
- Arrays are not supported at the moment but List and Map.
- OO-Path-Queries are not supported through List and Map at the moment.