Home » Search

About PersistenceUnitUtil

1-10 of 10 Refresh
Manual
103

JPA Primary Key

) of a specified managed entity object. For example: PersistenceUnitUtil util = emf.getPersistenceUnitUtil(); Object projectId = util.getIdentifier(project); A PersistenceUnitUtil instance
JPA Doc
92

getIdentifier(entity)

Method javax.persistence. PersistenceUnitUtil Object getIdentifier(   Object entity ) Return the id of the entity. A generated id is not guaranteed to be available until after the database insert has occurred. Returns null if the entity does not yet have an id. Parameters: entity - entity instance
JPA Doc
92

isLoaded(entity)

Method javax.persistence. PersistenceUnitUtil boolean isLoaded(   Object entity ) Determine the load state of an entity belonging to the persistence unit. This method can be used to determine the load state of an entity passed as a reference. An entity is considered loaded if all attributes
JPA Doc
92

isLoaded(entity, attributeName)

Method javax.persistence. PersistenceUnitUtil boolean isLoaded(   Object entity,   String attributeName ) Determine the load state of a given persistent attribute of an entity belonging to the persistence unit. Parameters: entity - entity instance containing the attribute attributeName - name
JPA Doc
92

javax.persistence.PersistenceUnitUtil

javax.persistence Interface PersistenceUnitUtil Superinterfaces: PersistenceUtil Utility interface between the application and the persistence provider managing the persistence unit. The methods of this interface should only be invoked on entity instances obtained from or managed by entity managers
JPA Doc
90

JPA Miscellaneous

This section contains miscellaneous JPA types. The PersistenceUtil and PersistenceUnitUtil interfaces provide general utility methods: The Cache interface and the CacheRetrieveMode and CacheStoreMode enum types serve in managing the EntityManagerFactory's shared (level 2) cache: Other enum types are provided for setting of various JPA operations:
JPA Doc
12

getPersistenceUnitUtil()

Method javax.persistence.EntityManagerFactory PersistenceUnitUtil getPersistenceUnitUtil() Return interface providing access to utility methods for the persistence unit. Returns: PersistenceUnitUtil interface Throws: IllegalStateException - if the entity manager factory has been closed Since: JPA 2.0
JPA Doc
12

javax.persistence.EntityManagerFactory

.0 PersistenceUnitUtil getPersistenceUnitUtil() Return interface providing access to utility methods ... unit. Returns: PersistenceUnitUtil interface Throws: IllegalStateException - if the entity manager
JPA Doc
9

javax.persistence.PersistenceUtil

javax.persistence Interface PersistenceUtil Subinterfaces: PersistenceUnitUtil Utility interface between the application and the persistence provider(s). The PersistenceUtil interface instance obtained from the Persistence class is used to determine the load state of an entity or entity attribute
Forum
3

EntityManager refresh problem

.persistence. PersistenceUnitUtil; import org.junit.Assert; import org.junit.Test; import entities