|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.provider.HibernateJpaProvider
public class HibernateJpaProvider
JpaProvider implementation for Hibernate. Uses Hibernates Metadata API for creating the entity metadata required by Pimento.
| Constructor Summary | |
|---|---|
HibernateJpaProvider(EntityManagerFactory entityManagerFactory)
Creates a new instance. |
|
| Method Summary | |
|---|---|
List<EntityMetadata> |
getMetadata(MetadataFactory factory,
Set<Operation> defaultOperations,
boolean manageAllEntities)
Creates metadata for all persistent entities managed by Pimento. |
Class<?> |
getPersistentClass(Object entity)
Returns the persistent class for the specified entity. |
boolean |
isUninitializedProxy(Object proxy)
Checks whether the specified entity is an uninitialized proxy. |
void |
setSupportedCustomTypes(Map<Class<? extends org.hibernate.usertype.UserType>,Class<? extends PropertyType>> supportedCustomTypes)
Adds mappings from custom Hibernate UserType implementations to Pimento PropertyTypes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernateJpaProvider(EntityManagerFactory entityManagerFactory)
entityManagerFactory - the EntityManagerFactory to use| Method Detail |
|---|
public void setSupportedCustomTypes(Map<Class<? extends org.hibernate.usertype.UserType>,Class<? extends PropertyType>> supportedCustomTypes)
PropertyType
and map the two in the Pimento configuration as a Cinnamon Bean Mapping.
supportedCustomTypes - a map of custom types
public List<EntityMetadata> getMetadata(MetadataFactory factory,
Set<Operation> defaultOperations,
boolean manageAllEntities)
JpaProviderImplementations must inspect all entities configured for JPA.
If the @Managed annotation is present the entity
must be included in the returned metadata collection.
Furthermore properties annotated with @Hidden
must be excluded from the managed properties.
getMetadata in interface JpaProviderfactory - the factory to use for creating EntityMetadataBuilder instancesdefaultOperations - the operations permitted for the EntityManager remote servicemanageAllEntities - whether all entities should be managed by Pimento, even if no Managed annotation is present
public boolean isUninitializedProxy(Object proxy)
JpaProvider
isUninitializedProxy in interface JpaProviderproxy - the entity to check
public Class<?> getPersistentClass(Object entity)
JpaProvider
getPersistentClass in interface JpaProviderentity - the entity to return the persistent class for
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||