org.wamblee.persistence
Class PersistentFactory
java.lang.Object
org.wamblee.persistence.PersistentFactory
public class PersistentFactory
- extends java.lang.Object
Factory which creates a Persistent object for a given entity for
interfacing with the primary key and version of the entity.
This utility only treats primary keys and fields that are annotated with @Id
and @Version. In case ORM files are used for the definition of primary key
and or version, then those fields are ignored.
- Author:
- Erik Brakkee
|
Method Summary |
static Persistent |
create(java.lang.Object aEntity)
Creates the Persistent wrapper for interfacing with primary key
and version of the entity. |
static org.wamblee.persistence.PersistentFactory.EntityAccessor |
createEntityAccessor(java.lang.Class aClass)
Create the entity accessor for a given class or returns a cached instance
if one already exists. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistentFactory
public PersistentFactory()
createEntityAccessor
public static org.wamblee.persistence.PersistentFactory.EntityAccessor createEntityAccessor(java.lang.Class aClass)
- Create the entity accessor for a given class or returns a cached instance
if one already exists.
- Parameters:
aClass - Class.
- Returns:
- Entity accessor for the given class or null of the given object
is not an entity.
create
public static Persistent create(java.lang.Object aEntity)
- Creates the
Persistent wrapper for interfacing with primary key
and version of the entity.
- Parameters:
aEntity - Entity to use.
- Returns:
- Persistent object or null if this is not an entity.
Copyright © 2010. All Rights Reserved.