org.ofbiz.entity.model
Class ModelField

java.lang.Object
  extended by org.ofbiz.entity.model.ModelChild
      extended by org.ofbiz.entity.model.ModelField
All Implemented Interfaces:
java.io.Serializable

public class ModelField
extends ModelChild

Generic Entity - Field model class

See Also:
Serialized Form

Field Summary
protected  java.lang.String colName
          The col-name of the Field
protected  boolean enableAuditLog
           
protected  boolean encrypt
           
protected  boolean isAutoCreatedInternal
           
protected  boolean isNotNull
           
protected  boolean isPk
          boolean which specifies whether or not the Field is a Primary Key
protected  java.lang.String name
          The name of the Field
protected  java.lang.String type
          The type of the Field
protected  java.util.List<java.lang.String> validators
          validators to be called when an update is done
 
Fields inherited from class org.ofbiz.entity.model.ModelChild
description, parentModelEntity
 
Constructor Summary
ModelField()
          Default Constructor
ModelField(DatabaseUtil.ColumnCheckInfo ccInfo, ModelFieldTypeReader modelFieldTypeReader)
          DB Names Constructor
ModelField(org.w3c.dom.Element fieldElement)
          XML Constructor
ModelField(java.lang.String name, java.lang.String type, java.lang.String colName, boolean isPk)
          Fields Constructor
ModelField(java.lang.String name, java.lang.String type, java.lang.String colName, boolean isPk, boolean encrypt, boolean enableAuditLog)
           
 
Method Summary
 void addValidator(java.lang.String validator)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getColName()
          The col-name of the Field
 boolean getEnableAuditLog()
           
 boolean getEncrypt()
           
 boolean getIsAutoCreatedInternal()
           
 boolean getIsNotNull()
           
 boolean getIsPk()
          boolean which specifies whether or not the Field is a Primary Key
 java.lang.String getName()
          The name of the Field
 java.lang.String getType()
          The type of the Field
 java.lang.String getValidator(int index)
          validators to be called when an update is done
 int getValidatorsSize()
           
 int hashCode()
           
 java.lang.String removeValidator(int index)
           
 void setColName(java.lang.String colName)
           
 void setEncrypt(boolean encrypt)
           
 void setIsAutoCreatedInternal(boolean isAutoCreatedInternal)
           
 void setIsNotNull(boolean isNotNull)
           
 void setIsPk(boolean isPk)
           
 void setName(java.lang.String name)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document)
           
 
Methods inherited from class org.ofbiz.entity.model.ModelChild
getDescription, getModelEntity, setDescription, setModelEntity
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of the Field


type

protected java.lang.String type
The type of the Field


colName

protected java.lang.String colName
The col-name of the Field


isPk

protected boolean isPk
boolean which specifies whether or not the Field is a Primary Key


encrypt

protected boolean encrypt

isNotNull

protected boolean isNotNull

isAutoCreatedInternal

protected boolean isAutoCreatedInternal

enableAuditLog

protected boolean enableAuditLog

validators

protected java.util.List<java.lang.String> validators
validators to be called when an update is done

Constructor Detail

ModelField

public ModelField()
Default Constructor


ModelField

public ModelField(java.lang.String name,
                  java.lang.String type,
                  java.lang.String colName,
                  boolean isPk)
Fields Constructor


ModelField

public ModelField(java.lang.String name,
                  java.lang.String type,
                  java.lang.String colName,
                  boolean isPk,
                  boolean encrypt,
                  boolean enableAuditLog)

ModelField

public ModelField(org.w3c.dom.Element fieldElement)
XML Constructor


ModelField

public ModelField(DatabaseUtil.ColumnCheckInfo ccInfo,
                  ModelFieldTypeReader modelFieldTypeReader)
DB Names Constructor

Method Detail

getName

public java.lang.String getName()
The name of the Field


setName

public void setName(java.lang.String name)

getType

public java.lang.String getType()
The type of the Field


setType

public void setType(java.lang.String type)

getColName

public java.lang.String getColName()
The col-name of the Field


setColName

public void setColName(java.lang.String colName)

getIsPk

public boolean getIsPk()
boolean which specifies whether or not the Field is a Primary Key


setIsPk

public void setIsPk(boolean isPk)

getIsNotNull

public boolean getIsNotNull()

setIsNotNull

public void setIsNotNull(boolean isNotNull)

getEncrypt

public boolean getEncrypt()

setEncrypt

public void setEncrypt(boolean encrypt)

getEnableAuditLog

public boolean getEnableAuditLog()

getIsAutoCreatedInternal

public boolean getIsAutoCreatedInternal()

setIsAutoCreatedInternal

public void setIsAutoCreatedInternal(boolean isAutoCreatedInternal)

getValidator

public java.lang.String getValidator(int index)
validators to be called when an update is done


getValidatorsSize

public int getValidatorsSize()

addValidator

public void addValidator(java.lang.String validator)

removeValidator

public java.lang.String removeValidator(int index)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document)