|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.adaptrex.core.persistence.jpa.JpaPersistence
@ApplicationScoped 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 |
deleteEntity(String entityName,
Integer id,
String persistenceUnitName)
This should delete an entity from the specified 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(Class<?> clazz,
Integer id,
String persistenceUnitName)
This should return a single entity object from the specified 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 |
Object |
getEntity(String entityName,
Integer id,
String persistenceUnitName)
This should return a single entity from the specified 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). |
Class<?> |
getEntityClass(String className,
String persistenceUnit)
This should return the class for a specific className in the specified 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. |
List<Object> |
getEntityList(Store store,
String persistenceUnitName)
This should return a list of objects from the default persistence unit 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. |
javax.persistence.EntityManager |
getEntityManager(String puName)
This should return the specified entity manager for whichever implementation is being used. |
Object |
getFieldValue(Object entity,
String fieldName)
|
Object |
getFieldValue(Object entity,
String fieldName,
String persistenceUnitName)
|
boolean |
isIdField(Class<?> clazz,
String fieldName)
|
boolean |
isIdField(Class<?> clazz,
String fieldName,
String persistenceUnitName)
|
boolean |
isManyToOne(Class<?> clazz,
String fieldName)
|
boolean |
isManyToOne(Class<?> clazz,
String fieldName,
String persistenceUnitName)
|
boolean |
isOneToMany(Class<?> clazz,
String fieldName)
|
boolean |
isOneToMany(Class<?> clazz,
String fieldName,
String persistenceUnitName)
|
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 |
Object |
saveEntity(Object entity,
String persistenceUnitName)
This should save (create or update) the supplied entity using the specified persistence unit and return an updated instance of the entity |
| 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 Class<?> getEntityClass(String className)
AdaptrexPersistence
getEntityClass in interface AdaptrexPersistence
public Class<?> getEntityClass(String className,
String persistenceUnit)
AdaptrexPersistence
getEntityClass in interface AdaptrexPersistencepublic javax.persistence.EntityManager getEntityManager()
AdaptrexPersistence
getEntityManager in interface AdaptrexPersistencepublic javax.persistence.EntityManager getEntityManager(String puName)
AdaptrexPersistence
getEntityManager in interface AdaptrexPersistence
public Object getEntity(String entityName,
Integer id)
AdaptrexPersistence
getEntity in interface AdaptrexPersistence
public Object getEntity(String entityName,
Integer id,
String persistenceUnitName)
AdaptrexPersistence
getEntity in interface AdaptrexPersistence
public Object getEntity(Class<?> clazz,
Integer id)
AdaptrexPersistence
getEntity in interface AdaptrexPersistence
public Object getEntity(Class<?> clazz,
Integer id,
String persistenceUnitName)
AdaptrexPersistence
getEntity in interface AdaptrexPersistencepublic Object saveEntity(Object entity)
AdaptrexPersistence
saveEntity in interface AdaptrexPersistence
public Object saveEntity(Object entity,
String persistenceUnitName)
AdaptrexPersistence
saveEntity in interface AdaptrexPersistence
public Object deleteEntity(String entityName,
Integer id)
AdaptrexPersistence
deleteEntity in interface AdaptrexPersistence
public Object deleteEntity(String entityName,
Integer id,
String persistenceUnitName)
AdaptrexPersistence
deleteEntity in interface AdaptrexPersistencepublic List<Object> getEntityList(Store store)
AdaptrexPersistence
getEntityList in interface AdaptrexPersistence
public List<Object> getEntityList(Store store,
String persistenceUnitName)
AdaptrexPersistence
getEntityList in interface AdaptrexPersistence
public boolean isIdField(Class<?> clazz,
String fieldName)
isIdField in interface AdaptrexPersistence
public boolean isIdField(Class<?> clazz,
String fieldName,
String persistenceUnitName)
isIdField in interface AdaptrexPersistence
public boolean isOneToMany(Class<?> clazz,
String fieldName)
isOneToMany in interface AdaptrexPersistence
public boolean isOneToMany(Class<?> clazz,
String fieldName,
String persistenceUnitName)
isOneToMany in interface AdaptrexPersistence
public boolean isManyToOne(Class<?> clazz,
String fieldName)
isManyToOne in interface AdaptrexPersistence
public boolean isManyToOne(Class<?> clazz,
String fieldName,
String persistenceUnitName)
isManyToOne in interface AdaptrexPersistence
public Object getFieldValue(Object entity,
String fieldName)
getFieldValue in interface AdaptrexPersistence
public Object getFieldValue(Object entity,
String fieldName,
String persistenceUnitName)
getFieldValue in interface AdaptrexPersistence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||