org.objectweb.jorm.metainfo.api
Interface PrimitiveElement
- MetaObject, Serializable, TypedElement
- ScalarField
public interface PrimitiveElement
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.
- X. Spengler
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
|
CONSTANT_NON_PERSISTENT
public static final int CONSTANT_NON_PERSISTENT
- 3
CONSTANT_PERSISTENT
public static final int CONSTANT_PERSISTENT
- 2
VARIABLE_PERSISTENT
public static final int VARIABLE_PERSISTENT
- 1
getScale
public int getScale()
getSize
public int getSize()
Returns the size of the field in case of string, serialized, arrays,
bigdecimal, etc
- the size for this type
getStatus
public int getStatus()
Gets the status wrt constance and persistence.
this.setStatus()
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).
isConstant
public boolean isConstant()
- true if the field is constant
isPersistent
public boolean isPersistent()
- true if the field is persistent
isScalar
public boolean isScalar()
Allows to know if the current Field is a scalar field or not.
- true, if the Field is scalar, else false, if the Field is not
scalar
setIsAutoCalculated
public void setIsAutoCalculated(boolean autocalculated)
this.isAutoCalculated()
setStatus
public 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