|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jsefa.common.mapping.TypeMapping<N>
net.sf.jsefa.common.mapping.ComplexTypeMapping<N,D,M>
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,?>>
A mapping between a java object type and a complex data type of the exchange format.
TypeMapping
Constructor Summary | |
---|---|
ComplexTypeMapping(Class<?> objectType,
N dataTypeName,
Collection<M> nodeMappings,
ObjectAccessor objectAccessor,
Validator validator)
Constructs a new ComplexTypeMapping . |
Method Summary | ||
---|---|---|
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. |
|
|
getNodeMapping(D nodeDescriptor)
Returns the node mapping for the given node descriptor. |
|
|
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()
|
Methods inherited from class net.sf.jsefa.common.mapping.TypeMapping |
---|
getDataTypeName, getObjectType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 nullMethod Detail |
---|
public final Collection<M> getNodeMappings()
public <T extends M> T getNodeMapping(D nodeDescriptor)
T
- the expected type of the node mappingnodeDescriptor
- the node descriptor
public <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 field
public List<String> getFieldNames(NodeType nodeType)
nodeType
- the node type
public final ObjectAccessor getObjectAccessor()
public final Validator getValidator()
protected Map<D,M> createNodeMappingsByNodeDescriptorMap(Collection<M> nodeMappings)
nodeMappings
- the node mappings
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |