Class EmbeddedClassStrategy
java.lang.Object
org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractClassStrategy
org.apache.openjpa.jdbc.meta.strats.EmbeddedClassStrategy
- All Implemented Interfaces:
Serializable,ClassStrategy,Strategy
Class mapping for embedded objects.
- Author:
- Abe White
- See Also:
-
Field Summary
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractClassStrategy
cls -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the proper synthetic null indicator value for the given instance.booleanindicatesNull(Object val) Return whether the given null indicator value means the object is null.booleanisPrimaryKeyObjectId(boolean hasAll) Return true if the this class' primary key columns correspond to the base class' primary key columns used to construct oid values.voidmap(boolean adapt) Map the owning mapping using this strategy.Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractClassStrategy
customLoad, customLoad, customLoad, joinSuperclass, setClassMapping, supportsEagerSelectMethods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.jdbc.meta.Strategy
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, update
-
Constructor Details
-
EmbeddedClassStrategy
public EmbeddedClassStrategy()
-
-
Method Details
-
map
public void map(boolean adapt) Description copied from interface:StrategyMap the owning mapping using this strategy.- Specified by:
mapin interfaceStrategy- Overrides:
mapin classAbstractStrategy- Parameters:
adapt- if true, use the owning mapping's raw mapping info to set its ORM data; if false, ORM data will already be set
-
getNullIndicatorValue
Return the proper synthetic null indicator value for the given instance. -
indicatesNull
Return whether the given null indicator value means the object is null. -
isPrimaryKeyObjectId
public boolean isPrimaryKeyObjectId(boolean hasAll) Description copied from interface:ClassStrategyReturn true if the this class' primary key columns correspond to the base class' primary key columns used to construct oid values. Base classes always return true. Classes that join to the base class table, though, may not always join using the same columns the base class uses for oid values, or may not use all the columns. When performing a select, we will join down to the most-derived class that is identified by oid values. We cannot use non-primary key field values for joining during selects, because the field values to join on might be the ones we're trying to select! Similarly, we can only reconstruct oid values for selected objects using classes whose primary keys store oid values.- Specified by:
isPrimaryKeyObjectIdin interfaceClassStrategy- Overrides:
isPrimaryKeyObjectIdin classAbstractClassStrategy- Parameters:
hasAll- if true, there must be a primary key column for every base class primary key column; if false the primary key must only match a subset of the base class primary key columns
-