Saturday, July 17, 2010

JPA persistence: a wrapper to make your life a bit easier

EntityManager is not exactly the friendliest beast... it acts of its own will, and its inferface is very restricted to few methods.

Here
http://javatoolsforweblogic.googlecode.com/svn/trunk/JPAPersistence/GEOPersistenceHandler.java

and here
http://javatoolsforweblogic.googlecode.com/svn/trunk/JPAPersistence/GEOPersistenceHandlerTest.java

a wrapper to enable you to use the JPA interface with more understandeable behaviour.

"Force" means: insert if it doesn't exist, update if it exists
"Insert" means: insert if it doesn't exist, exception if it exists
"Update" means: update if it exist, exception if it doesn't exist
"Delete" means: delete if it exist, exception if it doesn't exist

No comments: