Class StatementNewObjectMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.query.StatementNewObjectMapping
-
public class StatementNewObjectMapping extends java.lang.ObjectDefinition of the mapping of a new object definition in the results of a statement. The mappings are for the arguments to the constructor.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.ClassclsClass that we create an object of.(package private) java.util.Map<java.lang.Integer,java.lang.Object>ctrArgMappingsMappings for the constructor objects keyed by the position (in the constructor).
-
Constructor Summary
Constructors Constructor Description StatementNewObjectMapping(java.lang.Class cls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConstructorArgMapping(int ctrPos, java.lang.Object argMapping)Method to define the mapping for a constructor argument.java.lang.ObjectgetConstructorArgMapping(int position)Accessor for the mapping info for a constructor argument at the specified position.intgetNumberOfConstructorArgMappings()java.lang.Class<?>getObjectClass()booleanisEmpty()java.lang.StringtoString()
-
-
-
Method Detail
-
getObjectClass
public java.lang.Class<?> getObjectClass()
-
getConstructorArgMapping
public java.lang.Object getConstructorArgMapping(int position)
Accessor for the mapping info for a constructor argument at the specified position.- Parameters:
position- The position in the constructor- Returns:
- The argument mappings
-
addConstructorArgMapping
public void addConstructorArgMapping(int ctrPos, java.lang.Object argMapping)Method to define the mapping for a constructor argument. The "mapping" can be either a StatementMappingIndex, a literal or a StatementNewObjectMapping- Parameters:
ctrPos- The position in the constructorargMapping- The mapping for the argument
-
isEmpty
public boolean isEmpty()
-
getNumberOfConstructorArgMappings
public int getNumberOfConstructorArgMappings()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-