@java.lang.SuppressWarnings("rawtypes") public interface MappingConfigurationStrategy
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 Params | Return Type | Name and description |
---|---|---|
|
public PersistentProperty[] |
getCompositeIdentity(java.lang.Class javaClass, MappingContext context) Obtains the identity of a persistent entity |
|
public IdentityMapping |
getDefaultIdentityMapping(ClassMapping classMapping) Obtains the default manner in which identifiers are mapped. |
|
public PersistentProperty |
getIdentity(java.lang.Class javaClass, MappingContext context) Obtains the identity of a persistent entity |
|
public IdentityMapping |
getIdentityMapping(ClassMapping classMapping) Obtains the identity mapping for the specified class mapping |
|
public java.util.Set |
getOwningEntities(java.lang.Class javaClass, MappingContext context) Returns a set of entities that "own" the given entity. |
|
public java.util.List<PersistentProperty> |
getPersistentProperties(java.lang.Class javaClass, MappingContext context) |
|
public java.util.List<PersistentProperty> |
getPersistentProperties(PersistentEntity entity, MappingContext context, ClassMapping classMapping) |
|
public java.util.List<PersistentProperty> |
getPersistentProperties(PersistentEntity entity, MappingContext context, ClassMapping classMapping, boolean includeIdentifiers) |
|
public java.util.List<PersistentProperty> |
getPersistentProperties(java.lang.Class javaClass, MappingContext context, ClassMapping mapping) Obtains a List of PersistentProperty instances for the given Mapped class |
|
public boolean |
isPersistentEntity(java.lang.Class javaClass) Tests whether the given class is a persistent entity |
|
public void |
setCanExpandMappingContext(boolean canExpandMappingContext) Whether the strategy can add new entities to the mapping context |
Obtains the identity of a persistent entity
javaClass
- The Java classcontext
- The MappingContextObtains 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 classWhether the strategy can add new entities to the mapping context