Interface MappingManager
- All Known Implementing Classes:
MappingManagerImpl
public interface MappingManager
Representation of a MappingManager, mapping a java mapping type to a column mapping type.
Allows a java mapping type to map to multiple column mapping types.
Allows a default column mapping type be assigned to each java mapping type.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateColumn(org.datanucleus.metadata.AbstractMemberMetaData fmd, Table table, JavaTypeMapping mapping, org.datanucleus.metadata.ColumnMetaData colmd, Column referenceCol, org.datanucleus.ClassLoaderResolver clr) Method to create a column for a persistable mapping.createColumn(JavaTypeMapping mapping, String javaType, int datastoreFieldIndex) Method to create a column in a container (table).createColumn(JavaTypeMapping mapping, String javaType, org.datanucleus.metadata.ColumnMetaData colmd) Method to create a column in a container (table).createColumnMapping(JavaTypeMapping mapping, org.datanucleus.metadata.AbstractMemberMetaData fmd, int index, Column column) Method to create the column mapping for a java type mapping at a particular index.createColumnMapping(JavaTypeMapping mapping, Column column, String javaType) Method to create the column mapping for a particular column and java type.getMapping(Class javaType) Accessor for a mapping, for a java type.getMapping(Class javaType, boolean serialised, boolean embedded, String fieldName) Accessor for a mapping, for a java type.getMapping(Table table, org.datanucleus.metadata.AbstractMemberMetaData mmd, org.datanucleus.ClassLoaderResolver clr, org.datanucleus.metadata.FieldRole fieldRole) Accessor for the mapping for the field of the specified table.Class<? extends JavaTypeMapping> getMappingType(String javaTypeName) Accessor for the JavaTypeMapping class for the supplied java type.getMappingWithColumnMapping(Class javaType, boolean serialised, boolean embedded, org.datanucleus.ClassLoaderResolver clr) Accessor for a mapping, for a java type complete with the column mapping.booleanisSupportedMappedType(String javaTypeName) Accessor for whether a java type is supported as being mappable.
-
Field Details
-
METADATA_EXTENSION_INSERT_FUNCTION
- See Also:
-
METADATA_EXTENSION_UPDATE_FUNCTION
- See Also:
-
METADATA_EXTENSION_SELECT_FUNCTION
- See Also:
-
-
Method Details
-
isSupportedMappedType
Accessor for whether a java type is supported as being mappable.- Parameters:
javaTypeName- The java type name- Returns:
- Whether the class is supported (to some degree)
-
getMappingType
Accessor for the JavaTypeMapping class for the supplied java type.- Parameters:
javaTypeName- The java type name- Returns:
- The JavaTypeMapping class to use
-
createColumnMapping
ColumnMapping createColumnMapping(JavaTypeMapping mapping, org.datanucleus.metadata.AbstractMemberMetaData fmd, int index, Column column) Method to create the column mapping for a java type mapping at a particular index.- Parameters:
mapping- The java mappingfmd- MetaData for the fieldindex- Index of the columncolumn- The column- Returns:
- The column mapping
-
createColumnMapping
Method to create the column mapping for a particular column and java type.- Parameters:
mapping- The java mappingcolumn- The columnjavaType- The java type (isn't this stored in the java mapping ?)- Returns:
- The column mapping
-
getMapping
Accessor for a mapping, for a java type. Same as calling "getMapping(c, false, false, (String)null);"- Parameters:
javaType- The java type- Returns:
- The mapping
-
getMapping
Accessor for a mapping, for a java type.- Parameters:
javaType- The java typeserialised- Whether the type is serialisedembedded- Whether the type is embeddedfieldName- Name of the field (for logging only)- Returns:
- The mapping
-
getMappingWithColumnMapping
JavaTypeMapping getMappingWithColumnMapping(Class javaType, boolean serialised, boolean embedded, org.datanucleus.ClassLoaderResolver clr) Accessor for a mapping, for a java type complete with the column mapping.- Parameters:
javaType- The java typeserialised- Whether the type is serialisedembedded- Whether the type is embeddedclr- ClassLoader resolver- Returns:
- The mapping
-
getMapping
JavaTypeMapping getMapping(Table table, org.datanucleus.metadata.AbstractMemberMetaData mmd, org.datanucleus.ClassLoaderResolver clr, org.datanucleus.metadata.FieldRole fieldRole) Accessor for the mapping for the field of the specified table. Can be used for fields of a class, elements of a collection of a class, elements of an array of a class, keys of a map of a class, values of a map of a class. This is controlled by the final argument "roleForMember".- Parameters:
table- Table to add the mapping tommd- MetaData for the field/property to mapclr- The ClassLoaderResolverfieldRole- Role that this mapping plays for the field/property- Returns:
- The mapping for the field.
-
createColumn
Method to create a column in a container (table).- Parameters:
mapping- The java mappingjavaType- The java typedatastoreFieldIndex- The index of the column to create- Returns:
- The column
-
createColumn
Column createColumn(JavaTypeMapping mapping, String javaType, org.datanucleus.metadata.ColumnMetaData colmd) Method to create a column in a container (table). To be used for serialised PC element/key/value in a join table.- Parameters:
mapping- The java mappingjavaType- The java typecolmd- MetaData for the column to create- Returns:
- The column
-
createColumn
Column createColumn(org.datanucleus.metadata.AbstractMemberMetaData fmd, Table table, JavaTypeMapping mapping, org.datanucleus.metadata.ColumnMetaData colmd, Column referenceCol, org.datanucleus.ClassLoaderResolver clr) Method to create a column for a persistable mapping.- Parameters:
fmd- MetaData for the fieldtable- Table in the datastoremapping- The java mappingcolmd- MetaData for the column to createreferenceCol- The column to referenceclr- ClassLoader resolver- Returns:
- The column
-