org.objectweb.jorm.metainfo.api
Interface PrimitiveElement

All Superinterfaces:
MetaObject, java.io.Serializable, TypedElement
All Known Subinterfaces:
ScalarField

public interface PrimitiveElement
extends TypedElement

A PrimitiveElement is a field with a primitive type. Type can be boolean | byte | char | short | int | long | float | double | string | serialized| date | time | timestamp A primitive type can not be extended.

Author:
X. Spengler

Method Summary
 ValueMapping createValueMapping(java.lang.String mapperName, java.lang.String mappingName)
          Creates a new ValueMapping object for the current element.
 ValueMapping getValueMapping(java.lang.String mapperName, java.lang.String mappingName)
          Returns a ValueMapping object for the current element object.
 boolean isScalar()
          Allows to know if the current Field is a scalar field or not.
 java.util.Iterator iterateValueMapping()
          Allows to know all the ValueMapping object used for the current element.
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.TypedElement
getName, getType
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Method Detail

isScalar

public boolean isScalar()
Allows to know if the current Field is a scalar field or not.
Returns:
true, if the Field is scalar, else false, if the Field is not scalar

getValueMapping

public ValueMapping getValueMapping(java.lang.String mapperName,
                                    java.lang.String mappingName)
Returns a ValueMapping object for the current element object. If the corresponding object does not exist, null is returned.
Parameters:
mapperName - the name of the mapping element name
mappingName - the name of the mapping name
Returns:
a ValueMapping object. If there is no value mapping object, null is returned.

createValueMapping

public ValueMapping createValueMapping(java.lang.String mapperName,
                                       java.lang.String mappingName)
Creates a new ValueMapping object for the current element. This mapping is defined by the name of the mapper, and the name of the mapping. If the object already exists, it is returned.
Parameters:
mapperName - the name of the mapper name
mappingName - the name of the mapping name
Returns:
a new ValueMapping object. This object is dependent from the mapper.

iterateValueMapping

public java.util.Iterator iterateValueMapping()
Allows to know all the ValueMapping object used for the current element.
Returns:
an iterator object on ValueMapping object. If no ValueMapping is declared, an empty iterator is returned.