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

Field Summary
static int CONSTANT_NON_PERSISTENT
           
static int CONSTANT_PERSISTENT
           
static int VARIABLE_PERSISTENT
           
 
Method Summary
 int getScale()
           
 int getSize()
          Returns the size of the field in case of string, serialized, arrays, bigdecimal, etc
 int getStatus()
          Gets the status wrt constance and persistence.
 boolean isAutoCalculated()
          Indicate if the primitive element is auto calculated.
 boolean isConstant()
           
 boolean isPersistent()
           
 boolean isScalar()
          Allows to know if the current Field is a scalar field or not.
 void setIsAutoCalculated(boolean autocalculated)
           
 void setStatus(int status)
          Assigns the status indicating if the primitive element is one of: variable and persistent (classical case) constant and persistent constant and not persistent
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.TypedElement
getName, getType
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Field Detail

CONSTANT_PERSISTENT

public static final int CONSTANT_PERSISTENT
See Also:
Constant Field Values

CONSTANT_NON_PERSISTENT

public static final int CONSTANT_NON_PERSISTENT
See Also:
Constant Field Values

VARIABLE_PERSISTENT

public static final int VARIABLE_PERSISTENT
See Also:
Constant Field Values
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

getSize

public int getSize()
Returns the size of the field in case of string, serialized, arrays, bigdecimal, etc

Returns:
the size for this type

getScale

public int getScale()

getStatus

public int getStatus()
Gets the status wrt constance and persistence.

See Also:
this.setStatus()

setStatus

public void setStatus(int status)
Assigns the status indicating if the primitive element is one of:


isConstant

public boolean isConstant()
Returns:
true if the field is constant

isPersistent

public boolean isPersistent()
Returns:
true if the field is persistent

isAutoCalculated

public boolean isAutoCalculated()
Indicate if the primitive element is auto calculated. In case of a CompositeName, an auto calculated field means that the value is calculated by an external tool. In case of a class, an auto calculated field means that the value is calculated by the data support (auto increment value for instance).


setIsAutoCalculated

public void setIsAutoCalculated(boolean autocalculated)
See Also:
this.isAutoCalculated()