|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.adaptrex.core.persistence.jpa.JpaPersistence
public class JpaPersistence
| Constructor Summary | |
|---|---|
JpaPersistence()
|
|
| Method Summary | |
|---|---|
Object |
deleteEntity(String entityName,
Integer id)
This should delete an entity from the default persistence unit based on the supplied className and id |
Object |
getEntity(Class<?> clazz,
Integer id)
This should return a single entity object from the default persistence unit based on the supplied class and id |
Object |
getEntity(String entityName,
Integer id)
This should return a single entity object from the default persistence unit based on the supplied className and id |
Class<?> |
getEntityClass(String className)
This should return the class for a specific className in the default persistence unit (JPA Persistence Unit, Hibernate session, etc, etc). |
List<Object> |
getEntityList(Store store)
This should return a list of objects that comprise the data that is to be included in an ext.data.Store. |
javax.persistence.EntityManager |
getEntityManager()
This should return the default entity manager for whichever implementation is being used. |
Object |
getFieldValue(Object entity,
String fieldName)
|
boolean |
isIdField(Class<?> clazz,
String fieldName)
|
boolean |
isManyToOne(Class<?> clazz,
String fieldName)
|
boolean |
isOneToMany(Class<?> clazz,
String fieldName)
|
Object |
saveEntity(Object entity)
This should save (create or update) the supplied entity using the default persistence unit and return an updated instance of the entity |
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JpaPersistence()
| Method Detail |
|---|
public void shutdown()
shutdown in interface AdaptrexPersistencepublic Class<?> getEntityClass(String className)
AdaptrexPersistence
getEntityClass in interface AdaptrexPersistencepublic javax.persistence.EntityManager getEntityManager()
AdaptrexPersistence
getEntityManager in interface AdaptrexPersistence
public Object getEntity(String entityName,
Integer id)
AdaptrexPersistence
getEntity in interface AdaptrexPersistence
public Object getEntity(Class<?> clazz,
Integer id)
AdaptrexPersistence
getEntity in interface AdaptrexPersistencepublic Object saveEntity(Object entity)
AdaptrexPersistence
saveEntity in interface AdaptrexPersistence
public Object deleteEntity(String entityName,
Integer id)
AdaptrexPersistence
deleteEntity in interface AdaptrexPersistencepublic List<Object> getEntityList(Store store)
AdaptrexPersistence
getEntityList in interface AdaptrexPersistence
public boolean isIdField(Class<?> clazz,
String fieldName)
isIdField in interface AdaptrexPersistence
public boolean isOneToMany(Class<?> clazz,
String fieldName)
isOneToMany in interface AdaptrexPersistence
public boolean isManyToOne(Class<?> clazz,
String fieldName)
isManyToOne in interface AdaptrexPersistence
public Object getFieldValue(Object entity,
String fieldName)
getFieldValue in interface AdaptrexPersistence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||