Tuesday 28 June 2011

EJP (Easy Java Persistence) (A-ORM)

EJP is relational database persistence API for Java.EJP is far advanced and can handle things automatically,there is no annotation required or the messy xml configurations required as you do in the other type of ORM .But it doesn't support the creation of schema.The perfect scenario for usage of EJP is if you already have the existing database and all you need is to connect to it and work then EJP is perfect choice ;-).

Here you go http://www.easierjava.com/


The following  is the quick sample tried out .


Table  DCT  looks like this: 



The representative java class  for the above DCT table looks as below:



Test Class :


Thats all...Be sure that you have the jar files from the above link in your buildpath and the JDBC driver jar(mysql.jar in my case).EJP can also handle all types of associations and simply called as A-ORM(automatic object/relational mapping) ;-)


Cheers !!! :-)

No comments:

Post a Comment