Class ArrayMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
-
- org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
-
- org.datanucleus.store.rdbms.mapping.java.AbstractContainerMapping
-
- org.datanucleus.store.rdbms.mapping.java.ArrayMapping
-
- All Implemented Interfaces:
MappingCallbacks
- Direct Known Subclasses:
OracleArrayMapping
public class ArrayMapping extends AbstractContainerMapping implements MappingCallbacks
Mapping for an array.
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
EXTENSION_CHECK_CONSTRAINT_VALUES
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
absFieldNumber, columnMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type
-
-
Constructor Summary
Constructors Constructor Description ArrayMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancontainerIsStoredInSingleColumn()Convenience method to return if the array is stored in the owning table as a column.ClassgetJavaType()Accessor for the Java type represented here.voidinsertPostProcessing(org.datanucleus.state.ObjectProvider op)Perform any INSERT post processing as required by constituent ColumnMappings.voidpostFetch(org.datanucleus.state.ObjectProvider op)Method to be called after any fetch of the owner class element.voidpostInsert(org.datanucleus.state.ObjectProvider ownerOP)Method to be called after the insert of the owner class element.voidpostUpdate(org.datanucleus.state.ObjectProvider ownerOP)Method to be called after any update of the owner class element.voidpreDelete(org.datanucleus.state.ObjectProvider ownerOP)Method to be called before any delete of the owner class element, if the field in the owner is dependent-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.AbstractContainerMapping
getColumnMapping, getColumnMappings, getJavaTypeForColumnMapping, getNumberOfColumnMappings, getObject, getTable, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, prepareColumnMapping, replaceFieldWithWrapper, setObject
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping
getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
addColumnMapping, equals, failureMessage, getAbsoluteFieldNumber, getColumnMetaDataForMember, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getType, getValueForColumnMapping, hashCode, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, requiresInsertPostProcessing, requiresUpdatePostProcessing, setAbsFieldNumber, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setTable, updatePostProcessing
-
-
-
-
Method Detail
-
getJavaType
public Class getJavaType()
Accessor for the Java type represented here.- Specified by:
getJavaTypein classJavaTypeMapping- Returns:
- The java type
-
containerIsStoredInSingleColumn
protected boolean containerIsStoredInSingleColumn()
Convenience method to return if the array is stored in the owning table as a column. Overrides the superclass since arrays can be stored in a single column also when the no join is specified and the array is of a primitive/wrapper type.- Overrides:
containerIsStoredInSingleColumnin classAbstractContainerMapping- Returns:
- Whether it is stored in a single column in the main table.
-
insertPostProcessing
public void insertPostProcessing(org.datanucleus.state.ObjectProvider op)
Description copied from class:JavaTypeMappingPerform any INSERT post processing as required by constituent ColumnMappings. TODO Not yet utilised, see RDBMS-14- Specified by:
insertPostProcessingin interfaceMappingCallbacks- Overrides:
insertPostProcessingin classJavaTypeMapping- Parameters:
op- ObjectProvider of the object with this mapping
-
postInsert
public void postInsert(org.datanucleus.state.ObjectProvider ownerOP)
Method to be called after the insert of the owner class element.- Specified by:
postInsertin interfaceMappingCallbacks- Parameters:
ownerOP- ObjectProvider of the owner
-
postFetch
public void postFetch(org.datanucleus.state.ObjectProvider op)
Method to be called after any fetch of the owner class element.- Specified by:
postFetchin interfaceMappingCallbacks- Overrides:
postFetchin classAbstractContainerMapping- Parameters:
op- ObjectProvider of the owner
-
postUpdate
public void postUpdate(org.datanucleus.state.ObjectProvider ownerOP)
Method to be called after any update of the owner class element. This method could be called in two situations- Update an array field of an object by replacing the array with a new array, so UpdateRequest is called, which calls here
- Persist a new object, and it needed to wait til the element was inserted so goes into dirty state and then flush() triggers UpdateRequest, which comes here
- Specified by:
postUpdatein interfaceMappingCallbacks- Parameters:
ownerOP- ObjectProvider of the owner
-
preDelete
public void preDelete(org.datanucleus.state.ObjectProvider ownerOP)
Method to be called before any delete of the owner class element, if the field in the owner is dependent- Specified by:
preDeletein interfaceMappingCallbacks- Parameters:
ownerOP- ObjectProvider of the owner
-
-