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:
java.io.Serializable
@ThreadSafe public final class ModelField extends ModelChild
An object that models the<field>
element.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelField.EncryptMethod
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ModelField
create(ModelEntity modelEntity, java.lang.String name, java.lang.String type, boolean isPk)
Returns a newModelField
instance, initialized with the specified values.static ModelField
create(ModelEntity modelEntity, java.lang.String description, java.lang.String name, java.lang.String type, java.lang.String colName, java.lang.String colValue, java.lang.String fieldSet, boolean isNotNull, boolean isPk, boolean encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, java.util.List<java.lang.String> validators)
Returns a newModelField
instance, initialized with the specified values.static ModelField
create(ModelEntity modelEntity, java.lang.String description, java.lang.String name, java.lang.String type, java.lang.String colName, java.lang.String colValue, java.lang.String fieldSet, boolean isNotNull, boolean isPk, ModelField.EncryptMethod encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, java.util.List<java.lang.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, org.w3c.dom.Element fieldElement, boolean isPk)
Returns a newModelField
instance, initialized with the specified values.java.lang.String
getColName()
Returns the data source column name of this field.java.lang.String
getColValue()
boolean
getEnableAuditLog()
Returnstrue
if this field is included in the entity audit log.boolean
getEncrypt()
Deprecated.ModelField.EncryptMethod
getEncryptMethod()
java.lang.String
getFieldSet()
Returns the field set name this field is a member of.boolean
getIsAutoCreatedInternal()
Returnstrue
if this field was generated automatically by the entity engine.boolean
getIsNotNull()
Returnstrue
if this field cannot contain null.boolean
getIsPk()
Returnstrue
if this field is part of the primary key.java.lang.String
getName()
Returns the name of this field.java.lang.String
getType()
Returns the type of this field.java.util.List<java.lang.String>
getValidators()
java.lang.String
toString()
org.w3c.dom.Element
toXmlElement(org.w3c.dom.Document document)
-
Methods inherited from class org.apache.ofbiz.entity.model.ModelChild
getDescription, getModelEntity
-
-
-
-
Method Detail
-
create
public static ModelField create(ModelEntity modelEntity, java.lang.String name, java.lang.String type, boolean isPk)
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, java.lang.String description, java.lang.String name, java.lang.String type, java.lang.String colName, java.lang.String colValue, java.lang.String fieldSet, boolean isNotNull, boolean isPk, boolean encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, java.util.List<java.lang.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, java.lang.String description, java.lang.String name, java.lang.String type, java.lang.String colName, java.lang.String colValue, java.lang.String fieldSet, boolean isNotNull, boolean isPk, ModelField.EncryptMethod encrypt, boolean isAutoCreatedInternal, boolean enableAuditLog, java.util.List<java.lang.String> validators)
-
create
public static ModelField create(ModelEntity modelEntity, org.w3c.dom.Element fieldElement, boolean isPk)
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
public java.lang.String getName()
Returns the name of this field.
-
getType
public java.lang.String getType()
Returns the type of this field.
-
getColName
public java.lang.String getColName()
Returns the data source column name of this field.
-
getColValue
public java.lang.String 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 public boolean getEncrypt()
Deprecated.Returnstrue
if this field is encrypted.
-
getEncryptMethod
public ModelField.EncryptMethod 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
public java.lang.String getFieldSet()
Returns the field set name this field is a member of.
-
getValidators
public java.util.List<java.lang.String> getValidators()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toXmlElement
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document)
-
-