ORM module

This is a very early version of the documentation.

On these pages you will find documentation for ORM-UJO. At present, the basic use of the ORM is described by the sample code only. There is possible to download all sample poject in the Maven format from the SourceForge.

How to use INSERT ?

See how to create database and to how to INSERT an order with two items into database:

OrmHandler.getInstance().loadDatabase(Database.class);  
 
Order order = new Order();  
order.setDate(new Date());  
order.setDescr("John's order");  
 
Item item1 = new Item();  
item1.setOrder(order);  
item1.setDescr("Yellow table");  
 
Item item2 = new Item();  
item2.setOrder(order);  
item2.setDescr("Green window");  
 
Session session = OrmHandler.getInstance().getSession();  
session.save(order);  
session.save(item1);  
session.save(item2);  
 
session.commit();

TODO …

See a FAQ page to some more information.

Discussion

Enter your comment
TVWOP
 
 
orm.txt · Last modified: 2010/01/03 14:55 by pponec
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki