Package org.apache.ofbiz.entity.model
Class ModelField
java.lang.Object
org.apache.ofbiz.entity.model.ModelChild
org.apache.ofbiz.entity.model.ModelField
- All Implemented Interfaces:
Serializable
An object that models the
<field>
element.- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ModelField
create
(ModelEntity modelEntity, String name, String type, boolean isPk) Returns a newModelField
instance, initialized with the specified values.static ModelField
create
(ModelEntity modelEntity, String description, String name, String type, String colName, String colValue, String fieldSet, boolean isNotNull, boolean isPk, boolean encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, List<String> validators) Returns a newModelField
instance, initialized with the specified values.static ModelField
create
(ModelEntity modelEntity, String description, String name, String type, String colName, String colValue, String fieldSet, boolean isNotNull, boolean isPk, ModelField.EncryptMethod encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, List<String> validators) static ModelField
create
(ModelEntity modelEntity, DatabaseUtil.ColumnCheckInfo ccInfo, ModelFieldTypeReader modelFieldTypeReader) Returns a newModelField
instance, initialized with the specified values.static ModelField
create
(ModelEntity modelEntity, Element fieldElement, boolean isPk) Returns a newModelField
instance, initialized with the specified values.Returns the data source column name of this field.boolean
Returnstrue
if this field is included in the entity audit log.boolean
Deprecated.Returns the field set name this field is a member of.boolean
Returnstrue
if this field was generated automatically by the entity engine.boolean
Returnstrue
if this field cannot contain null.boolean
getIsPk()
Returnstrue
if this field is part of the primary key.getName()
Returns the name of this field.getType()
Returns the type of this field.toString()
toXmlElement
(Document document) Methods inherited from class org.apache.ofbiz.entity.model.ModelChild
getDescription, getModelEntity
-
Method Details
-
create
Returns a newModelField
instance, initialized with the specified values.- Parameters:
modelEntity
- TheModelEntity
this field is a member of.name
- The field name.type
- The field type.isPk
-true
if this field is part of the primary key.
-
create
public static ModelField create(ModelEntity modelEntity, String description, String name, String type, String colName, String colValue, String fieldSet, boolean isNotNull, boolean isPk, boolean encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, List<String> validators) Returns a newModelField
instance, initialized with the specified values.- Parameters:
modelEntity
- TheModelEntity
this field is a member of.description
- The field description.name
- The field name.type
- The field type.colName
- The data source column name for this field. Will be generated automatically if left empty.colValue
-fieldSet
- The field set name this field is a member of.isNotNull
-true
if this field cannot contain a null value.isPk
-true
if this field is part of the primary key.encrypt
-true
if this field is encrypted.isAutoCreatedInternal
-true
if this field was generated automatically by the entity engine.enableAuditLog
-true
if this field is included in the entity audit log.validators
- The validators for this field.
-
create
public static ModelField create(ModelEntity modelEntity, String description, String name, String type, String colName, String colValue, String fieldSet, boolean isNotNull, boolean isPk, ModelField.EncryptMethod encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, List<String> validators) -
create
Returns a newModelField
instance, initialized with the specified values.- Parameters:
modelEntity
- TheModelEntity
this field is a member of.fieldElement
- The<field>
element containing the values for this field.isPk
-true
if this field is part of the primary key.
-
create
public static ModelField create(ModelEntity modelEntity, DatabaseUtil.ColumnCheckInfo ccInfo, ModelFieldTypeReader modelFieldTypeReader) Returns a newModelField
instance, initialized with the specified values.- Parameters:
modelEntity
- TheModelEntity
this field is a member of.ccInfo
- TheColumnCheckInfo
containing the values for this field.modelFieldTypeReader
-
-
getName
Returns the name of this field. -
getType
Returns the type of this field. -
getColName
Returns the data source column name of this field. -
getColValue
-
getIsPk
public boolean getIsPk()Returnstrue
if this field is part of the primary key. -
getIsNotNull
public boolean getIsNotNull()Returnstrue
if this field cannot contain null. -
getEncrypt
Deprecated.Returnstrue
if this field is encrypted. -
getEncryptMethod
-
getEnableAuditLog
public boolean getEnableAuditLog()Returnstrue
if this field is included in the entity audit log. -
getIsAutoCreatedInternal
public boolean getIsAutoCreatedInternal()Returnstrue
if this field was generated automatically by the entity engine. -
getFieldSet
Returns the field set name this field is a member of. -
getValidators
-
toString
-
toXmlElement
-