N
- the type of the data type nameD
- the type of the node descriptorM
- the type of the node mappingpublic abstract class ComplexTypeMapping<N,D extends NodeDescriptor<?>,M extends NodeMapping<N,?>> extends TypeMapping<N>
TypeMapping
Constructor and Description |
---|
ComplexTypeMapping(Class<?> objectType,
N dataTypeName,
Collection<M> nodeMappings,
ObjectAccessor objectAccessor,
Validator validator)
Constructs a new
ComplexTypeMapping . |
Modifier and Type | Method and Description |
---|---|
protected Map<D,M> |
createNodeMappingsByNodeDescriptorMap(Collection<M> nodeMappings)
Creates a map of node mappings by node descriptors.
|
List<String> |
getFieldNames(NodeType nodeType)
Returns the names of all fields which map to a node of the given node type.
|
<T extends M> |
getNodeMapping(D nodeDescriptor)
Returns the node mapping for the given node descriptor.
|
<T extends M> |
getNodeMapping(String fieldName,
Class<?> objectType)
Returns the node mapping for the given field name and required object type of the field.
|
Collection<M> |
getNodeMappings() |
ObjectAccessor |
getObjectAccessor() |
Validator |
getValidator() |
getDataTypeName, getObjectType
public ComplexTypeMapping(Class<?> objectType, N dataTypeName, Collection<M> nodeMappings, ObjectAccessor objectAccessor, Validator validator)
ComplexTypeMapping
.objectType
- the object type.dataTypeName
- the data type name.nodeMappings
- the node mappingsobjectAccessor
- the object accessorvalidator
- the validator - may be nullpublic final Collection<M> getNodeMappings()
public <T extends M> T getNodeMapping(D nodeDescriptor)
T
- the expected type of the node mappingnodeDescriptor
- the node descriptorpublic <T extends M> T getNodeMapping(String fieldName, Class<?> objectType)
T
- the expected type of the node mappingfieldName
- the field nameobjectType
- the required object type of the fieldpublic List<String> getFieldNames(NodeType nodeType)
nodeType
- the node typepublic final ObjectAccessor getObjectAccessor()
public final Validator getValidator()
protected Map<D,M> createNodeMappingsByNodeDescriptorMap(Collection<M> nodeMappings)
nodeMappings
- the node mappingsCopyright © 2014. All rights reserved.