Class RelationStrategies
java.lang.Object
org.apache.openjpa.jdbc.meta.strats.RelationStrategies
Helper methods for relation mappings.
- Author:
- Abe White
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenJPAStateManagergetStateManager(Object obj, StoreContext ctx) Return the state manager for the given instance, using a detached state manager if the instnace is not managed.static booleanisRelationId(Column[] cols) Affirms if all of the given columns represent a relationship identifier.static booleanAffirms if all of the foreign key columns represent a relationship identifier.static voidmapRelationToUnmappedPC(ValueMapping vm, String name, boolean adapt) Map a logical foreign key to an unmapped base class relation.static voidmapRelationToUnmappedPC(ValueMapping vm, DBIdentifier name, boolean adapt) static ObjecttoDataStoreValue(ValueMapping vm, Object val, JDBCStore store) Return the given object as its foreign key values.static MetaDataExceptionReturn an exception indicating that the relation is invalid because it has is based on an inverse foreign key and has independent subclasses.static MetaDataExceptionReturn an exception indicating that we cannot join to the given relation.static MetaDataExceptionReturn an exception indicating that the relation cannot be loaded because it has independent subclasses and does not represent a full oid.
-
Constructor Details
-
RelationStrategies
public RelationStrategies()
-
-
Method Details
-
unjoinable
Return an exception indicating that we cannot join to the given relation. -
unloadable
Return an exception indicating that the relation cannot be loaded because it has independent subclasses and does not represent a full oid. -
uninversable
Return an exception indicating that the relation is invalid because it has is based on an inverse foreign key and has independent subclasses. -
toDataStoreValue
Return the given object as its foreign key values. -
mapRelationToUnmappedPC
Map a logical foreign key to an unmapped base class relation. -
mapRelationToUnmappedPC
-
getStateManager
Return the state manager for the given instance, using a detached state manager if the instnace is not managed. -
isRelationId
Affirms if all of the given columns represent a relationship identifier. -
isRelationId
Affirms if all of the foreign key columns represent a relationship identifier.
-