This interface defines a strategy for reading how persistent properties are defined in a persistent entity.
Subclasses can implement this interface in order to provide a different mechanism for mapping entities such as annotations or XML.
Type | Name and description |
---|---|
IdentityMapping |
getDefaultIdentityMapping(ClassMapping classMapping) Obtains the default manner in which identifiers are mapped. |
PersistentProperty |
getIdentity(java.lang.Class javaClass, MappingContext context) Obtains the identity of a persistent entity |
IdentityMapping |
getIdentityMapping(ClassMapping classMapping) Obtains the identity mapping for the specified class mapping |
java.util.Set |
getOwningEntities(java.lang.Class javaClass, MappingContext context) Returns a set of entities that "own" the given entity. |
java.util.List<PersistentProperty> |
getPersistentProperties(java.lang.Class javaClass, MappingContext context) @see #getPersistentProperties(Class, MappingContext, ClassMapping) |
java.util.List<PersistentProperty> |
getPersistentProperties(PersistentEntity entity, MappingContext context, ClassMapping classMapping) @see #getPersistentProperties(Class, MappingContext, ClassMapping) |
java.util.List<PersistentProperty> |
getPersistentProperties(java.lang.Class javaClass, MappingContext context, ClassMapping mapping) Obtains a List of PersistentProperty instances for the given Mapped class |
boolean |
isPersistentEntity(java.lang.Class javaClass) Tests whether the given class is a persistent entity |
Obtains the default manner in which identifiers are mapped. In GORM this is just using a property called 'id', but in other frameworks this may differ. For example JPA expects an annotated
classMapping
- The ClassMapping instanceObtains the identity of a persistent entity
javaClass
- The Java classcontext
- The MappingContextObtains the identity mapping for the specified class mapping
classMapping
- The class mappingReturns a set of entities that "own" the given entity. Ownership dictates default cascade strategies. So if entity A owns entity B then saves, updates and deletes will cascade from A to B
javaClass
- The Java classcontext
- The MappingContext
Obtains a List of PersistentProperty instances for the given Mapped class
javaClass
- The Java classcontext
- The MappingContext instancemapping
- The mapping for this classTests whether the given class is a persistent entity
javaClass
- The java class