org.ofbiz.entity.model
Class ModelEntity

java.lang.Object
  extended by org.ofbiz.entity.model.ModelInfo
      extended by org.ofbiz.entity.model.ModelEntity
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ModelEntity>
Direct Known Subclasses:
ModelViewEntity

public class ModelEntity
extends ModelInfo
implements java.lang.Comparable<ModelEntity>, java.io.Serializable

Generic Entity - Entity model class

See Also:
Serialized Form

Field Summary
protected  boolean autoClearCache
           
static java.lang.String CREATE_STAMP_FIELD
           
static java.lang.String CREATE_STAMP_TX_FIELD
           
protected  java.lang.String defaultResourceName
          The default-resource-name of the Entity, used with the getResource call to check for a value in a resource bundle
protected  java.lang.String dependentOn
          The entity-name of the Entity that this Entity is dependent on, if empty then no dependency
protected  boolean doLock
          An indicator to specify if this entity requires locking for updates
protected  java.lang.String entityName
          The entity-name of the Entity
protected  java.util.List<ModelField> fields
          A List of the Field objects for the Entity
protected  java.util.Map<java.lang.String,ModelField> fieldsMap
           
protected  java.lang.Boolean hasFieldWithAuditLog
           
protected  java.util.List<ModelIndex> indexes
          indexes on fields/columns in this entity
protected  java.lang.String location
          The location of this entity's definition
protected  ModelReader modelReader
          The ModelReader that created this Entity
static java.lang.String module
           
protected  boolean neverCache
          An indicator to specify if this entity is never cached.
protected  boolean noAutoStamp
          Can be used to disable automatically creating update stamp fields and populating them on inserts and updates
protected  java.util.List<ModelField> nopks
          A List of the Field objects for the Entity, one for each NON Primary Key
protected  java.lang.String packageName
          The package-name of the Entity
protected  java.util.List<ModelField> pks
          A List of the Field objects for the Entity, one for each Primary Key
protected  java.util.List<ModelRelation> relations
          relations defining relationships between this entity and other entities
protected  java.lang.Integer sequenceBankSize
          The sequence-bank-size of the Entity
static java.lang.String STAMP_FIELD
          The name of the time stamp field for locking/syncronization
static java.lang.String STAMP_TX_FIELD
           
protected  java.lang.String tableName
          The table-name of the Entity
protected  java.util.Map<java.lang.String,ModelViewEntity> viewEntities
          map of ModelViewEntities that references this model
 
Fields inherited from class org.ofbiz.entity.model.ModelInfo
author, copyright, def, DEFAULT, description, title, version
 
Constructor Summary
  ModelEntity()
          Default Constructor
protected ModelEntity(ModelReader reader, org.w3c.dom.Element entityElement, ModelInfo def)
          XML Constructor
  ModelEntity(ModelReader reader, org.w3c.dom.Element entityElement, UtilTimer utilTimer, ModelInfo def)
          XML Constructor
  ModelEntity(java.lang.String tableName, java.util.Map<java.lang.String,DatabaseUtil.ColumnCheckInfo> colMap, ModelFieldTypeReader modelFieldTypeReader, boolean isCaseSensitive)
          DB Names Constructor
 
Method Summary
 void addExtendEntity(ModelReader reader, org.w3c.dom.Element extendEntityElement)
           
 void addField(ModelField field)
           
 void addIndex(ModelIndex index)
           
 void addRelation(ModelRelation relation)
           
 void addViewEntity(ModelViewEntity view)
           
 boolean areFields(java.util.Collection<java.lang.String> fieldNames)
           
 java.lang.String classNameString(java.util.List<ModelField> flds)
           
 java.lang.String classNameString(java.util.List<ModelField> flds, java.lang.String separator, java.lang.String afterLast)
           
 java.lang.String classNameString(ModelField... flds)
           
 java.lang.String classNameString(java.lang.String separator, java.lang.String afterLast, ModelField... flds)
           
 java.lang.String colNameString(java.util.List<ModelField> flds)
           
 java.lang.String colNameString(java.util.List<ModelField> flds, java.lang.String separator, java.lang.String afterLast, boolean alias)
           
 java.lang.String colNameString(ModelField... flds)
           
 java.lang.String colNameString(java.lang.String separator, java.lang.String afterLast, boolean alias, ModelField... flds)
           
 int compareTo(ModelEntity otherModelEntity)
           
 boolean containsAllPkFieldNames(java.util.Set<java.lang.String> fieldNames)
           
 void convertFieldMapInPlace(java.util.Map<java.lang.String,java.lang.Object> inContext, GenericDelegator delegator)
           
 java.lang.Object convertFieldValue(ModelField modelField, java.lang.Object value, GenericDelegator delegator)
           
 java.lang.Object convertFieldValue(ModelField modelField, java.lang.Object value, GenericDelegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> context)
          Convert a field value from one Java data type to another.
 java.lang.Object convertFieldValue(java.lang.String fieldName, java.lang.Object value, GenericDelegator delegator)
           
 java.util.List<? extends java.util.Map<java.lang.String,java.lang.Object>> convertToViewValues(java.lang.String viewEntityName, GenericEntity entity)
           
 java.util.Map<java.lang.String,java.lang.Object> createEoModelMap(java.lang.String entityPrefix, java.lang.String helperName, java.util.Set<java.lang.String> entityNameIncludeSet, ModelReader entityModelReader)
           
protected  void createFieldsMap()
           
 java.lang.String fieldNameString()
           
 java.lang.String fieldNameString(java.lang.String separator, java.lang.String afterLast)
           
 java.lang.String fieldsStringList(java.util.List<ModelField> flds, java.lang.String eachString, java.lang.String separator)
           
 java.lang.String fieldsStringList(java.util.List<ModelField> flds, java.lang.String eachString, java.lang.String separator, boolean appendIndex)
           
 java.lang.String fieldsStringList(java.util.List<ModelField> flds, java.lang.String eachString, java.lang.String separator, boolean appendIndex, boolean onlyNonPK)
           
 java.lang.String fieldsStringList(java.lang.String eachString, java.lang.String separator, boolean appendIndex, boolean onlyNonPK, ModelField... flds)
           
 java.lang.String fieldsStringList(java.lang.String eachString, java.lang.String separator, boolean appendIndex, ModelField... flds)
           
 java.lang.String fieldsStringList(java.lang.String eachString, java.lang.String separator, ModelField... flds)
           
 java.lang.String fieldTypeNameString()
           
 java.lang.String finderQueryString(java.util.List<ModelField> flds)
           
 java.lang.String finderQueryString(ModelField... flds)
           
 java.util.List<java.lang.String> getAllFieldNames()
           
 boolean getAutoClearCache()
           
 java.lang.String getColNameOrAlias(java.lang.String fieldName)
          The col-name of the Field, the alias of the field if this is on a view-entity
 java.lang.String getDefaultResourceName()
          The default-resource-name of the Entity
 java.lang.String getDependentOn()
          The entity-name of the Entity that this Entity is dependent on, if empty then no dependency
 boolean getDoLock()
          An indicator to specify if this entity requires locking for updates
 java.lang.String getEntityName()
          The entity-name of the Entity
 ModelField getField(int index)
          Deprecated.  
 ModelField getField(java.lang.String fieldName)
           
 java.util.List<java.lang.String> getFieldNamesFromFieldVector(java.util.List<ModelField> modelFields)
           
 java.util.List<java.lang.String> getFieldNamesFromFieldVector(ModelField... modelFields)
           
 java.util.List<ModelField> getFieldsCopy()
          Deprecated. Use getFieldsUnmodifiable instead.
 java.util.Iterator<ModelField> getFieldsIterator()
           
 int getFieldsSize()
           
 java.util.List<ModelField> getFieldsUnmodifiable()
           
 java.lang.String getFirstPkFieldName()
           
 boolean getHasFieldWithAuditLog()
           
 ModelIndex getIndex(int index)
           
 ModelIndex getIndex(java.lang.String indexName)
           
 java.util.Iterator<ModelIndex> getIndexesIterator()
           
 int getIndexesSize()
           
 java.lang.String getLocation()
           
 ModelReader getModelReader()
           
 boolean getNeverCache()
          An indicator to specify if this entity is never cached.
 boolean getNoAutoStamp()
           
 ModelField getNopk(int index)
          Deprecated.  
 java.util.List<java.lang.String> getNoPkFieldNames()
           
 java.util.List<ModelField> getNopksCopy()
           
 java.util.Iterator<ModelField> getNopksIterator()
           
 int getNopksSize()
           
 ModelField getOnlyPk()
           
 java.lang.String getPackageName()
          The package-name of the Entity
 ModelField getPk(int index)
          Deprecated.  
 java.util.List<java.lang.String> getPkFieldNames()
           
 java.util.List<ModelField> getPkFieldsUnmodifiable()
           
 java.util.List<ModelField> getPksCopy()
          Deprecated. Use getPkFieldsUnmodifiable instead.
 java.util.Iterator<ModelField> getPksIterator()
           
 int getPksSize()
           
 java.lang.String getPlainTableName()
          The plain table-name of the Entity without a schema name prefix
 ModelRelation getRelation(int index)
           
 ModelRelation getRelation(java.lang.String relationName)
           
 java.util.Iterator<ModelRelation> getRelationsIterator()
           
 java.util.List<ModelRelation> getRelationsList(boolean includeOne, boolean includeOneNoFk, boolean includeMany)
           
 java.util.List<ModelRelation> getRelationsManyList()
           
 java.util.List<ModelRelation> getRelationsOneList()
           
 int getRelationsOneSize()
           
 int getRelationsSize()
           
 java.lang.Integer getSequenceBankSize()
           
 java.lang.String getTableName(DatasourceInfo datasourceInfo)
          The table-name of the Entity including a Schema name if specified in the datasource config
 java.lang.String getTableName(java.lang.String helperName)
          The table-name of the Entity including a Schema name if specified in the datasource config
 java.util.Iterator<java.util.Map.Entry<java.lang.String,ModelViewEntity>> getViewConvertorsIterator()
           
 int getViewEntitiesSize()
           
 ModelViewEntity getViewEntity(java.lang.String viewEntityName)
           
 java.lang.String httpArgList(java.util.List<ModelField> flds)
           
 java.lang.String httpArgList(ModelField... flds)
           
 java.lang.String httpArgListFromClass(java.util.List<ModelField> flds)
           
 java.lang.String httpArgListFromClass(java.util.List<ModelField> flds, java.lang.String entityNameSuffix)
           
 java.lang.String httpArgListFromClass(ModelField... flds)
           
 java.lang.String httpArgListFromClass(java.lang.String entityNameSuffix, ModelField... flds)
           
 java.lang.String httpRelationArgList(java.util.List<ModelField> flds, ModelRelation relation)
           
 java.lang.String httpRelationArgList(ModelRelation relation, ModelField... flds)
           
 boolean isField(java.lang.String fieldName)
           
 boolean lock()
           
 java.lang.String nameString(java.util.List<ModelField> flds)
           
 java.lang.String nameString(java.util.List<ModelField> flds, java.lang.String separator, java.lang.String afterLast)
           
 java.lang.String nonPkNullList()
           
 java.lang.String pkNameString()
           
 java.lang.String pkNameString(java.lang.String separator, java.lang.String afterLast)
           
protected  void populateBasicInfo(org.w3c.dom.Element entityElement)
           
protected  void populateIndexes(org.w3c.dom.Element entityElement)
           
protected  void populateRelated(ModelReader reader, org.w3c.dom.Element entityElement)
           
 java.lang.String primKeyClassNameString()
           
 ModelField removeField(int index)
           
 ModelField removeField(java.lang.String fieldName)
           
 ModelIndex removeIndex(int index)
           
 ModelRelation removeRelation(int index)
           
 ModelViewEntity removeViewEntity(ModelViewEntity viewEntity)
           
 ModelViewEntity removeViewEntity(java.lang.String viewEntityName)
           
 void setAutoClearCache(boolean autoClearCache)
           
 void setDefaultResourceName(java.lang.String defaultResourceName)
           
 void setDependentOn(java.lang.String dependentOn)
           
 void setDoLock(boolean doLock)
           
 void setEntityName(java.lang.String entityName)
           
 void setLocation(java.lang.String location)
           
 void setNeverCache(boolean neverCache)
           
 void setNoAutoStamp(boolean noAutoStamp)
           
 void setPackageName(java.lang.String packageName)
           
 void setTableName(java.lang.String tableName)
           
 java.lang.String toString()
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document)
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document document, java.lang.String packageName)
           
 java.lang.String typeNameString(java.util.List<ModelField> flds)
           
 java.lang.String typeNameString(ModelField... flds)
           
 java.lang.String typeNameStringRelatedAndMain(java.util.List<ModelField> flds, ModelRelation relation)
           
 java.lang.String typeNameStringRelatedAndMain(ModelRelation relation, ModelField... flds)
           
 java.lang.String typeNameStringRelatedNoMapped(java.util.List<ModelField> flds, ModelRelation relation)
           
 java.lang.String typeNameStringRelatedNoMapped(ModelRelation relation, ModelField... flds)
           
 void updatePkLists()
           
 void writeEoModelText(java.io.PrintWriter writer, java.lang.String entityPrefix, java.lang.String helperName, java.util.Set<java.lang.String> entityNameIncludeSet, ModelReader entityModelReader)
          Writes entity model information in the Apple EOModelBundle format.
 
Methods inherited from class org.ofbiz.entity.model.ModelInfo
getAuthor, getCopyright, getDescription, getTitle, getVersion, populateFromAttributes, populateFromElements, setAuthor, setCopyright, setDescription, setTitle, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module

STAMP_FIELD

public static final java.lang.String STAMP_FIELD
The name of the time stamp field for locking/syncronization

See Also:
Constant Field Values

STAMP_TX_FIELD

public static final java.lang.String STAMP_TX_FIELD
See Also:
Constant Field Values

CREATE_STAMP_FIELD

public static final java.lang.String CREATE_STAMP_FIELD
See Also:
Constant Field Values

CREATE_STAMP_TX_FIELD

public static final java.lang.String CREATE_STAMP_TX_FIELD
See Also:
Constant Field Values

modelReader

protected ModelReader modelReader
The ModelReader that created this Entity


entityName

protected java.lang.String entityName
The entity-name of the Entity


tableName

protected java.lang.String tableName
The table-name of the Entity


packageName

protected java.lang.String packageName
The package-name of the Entity


defaultResourceName

protected java.lang.String defaultResourceName
The default-resource-name of the Entity, used with the getResource call to check for a value in a resource bundle


dependentOn

protected java.lang.String dependentOn
The entity-name of the Entity that this Entity is dependent on, if empty then no dependency


sequenceBankSize

protected java.lang.Integer sequenceBankSize
The sequence-bank-size of the Entity


fields

protected java.util.List<ModelField> fields
A List of the Field objects for the Entity


fieldsMap

protected java.util.Map<java.lang.String,ModelField> fieldsMap

pks

protected java.util.List<ModelField> pks
A List of the Field objects for the Entity, one for each Primary Key


nopks

protected java.util.List<ModelField> nopks
A List of the Field objects for the Entity, one for each NON Primary Key


relations

protected java.util.List<ModelRelation> relations
relations defining relationships between this entity and other entities


indexes

protected java.util.List<ModelIndex> indexes
indexes on fields/columns in this entity


viewEntities

protected java.util.Map<java.lang.String,ModelViewEntity> viewEntities
map of ModelViewEntities that references this model


doLock

protected boolean doLock
An indicator to specify if this entity requires locking for updates


noAutoStamp

protected boolean noAutoStamp
Can be used to disable automatically creating update stamp fields and populating them on inserts and updates


neverCache

protected boolean neverCache
An indicator to specify if this entity is never cached. If true causes the delegator to not clear caches on write and to not get from cache on read showing a warning messages to that effect


autoClearCache

protected boolean autoClearCache

hasFieldWithAuditLog

protected java.lang.Boolean hasFieldWithAuditLog

location

protected java.lang.String location
The location of this entity's definition

Constructor Detail

ModelEntity

public ModelEntity()
Default Constructor


ModelEntity

protected ModelEntity(ModelReader reader,
                      org.w3c.dom.Element entityElement,
                      ModelInfo def)
XML Constructor


ModelEntity

public ModelEntity(ModelReader reader,
                   org.w3c.dom.Element entityElement,
                   UtilTimer utilTimer,
                   ModelInfo def)
XML Constructor


ModelEntity

public ModelEntity(java.lang.String tableName,
                   java.util.Map<java.lang.String,DatabaseUtil.ColumnCheckInfo> colMap,
                   ModelFieldTypeReader modelFieldTypeReader,
                   boolean isCaseSensitive)
DB Names Constructor

Method Detail

populateBasicInfo

protected void populateBasicInfo(org.w3c.dom.Element entityElement)

populateRelated

protected void populateRelated(ModelReader reader,
                               org.w3c.dom.Element entityElement)

populateIndexes

protected void populateIndexes(org.w3c.dom.Element entityElement)

containsAllPkFieldNames

public boolean containsAllPkFieldNames(java.util.Set<java.lang.String> fieldNames)

addExtendEntity

public void addExtendEntity(ModelReader reader,
                            org.w3c.dom.Element extendEntityElement)

getModelReader

public ModelReader getModelReader()

getEntityName

public java.lang.String getEntityName()
The entity-name of the Entity


setEntityName

public void setEntityName(java.lang.String entityName)

getPlainTableName

public java.lang.String getPlainTableName()
The plain table-name of the Entity without a schema name prefix


getTableName

public java.lang.String getTableName(java.lang.String helperName)
The table-name of the Entity including a Schema name if specified in the datasource config


getTableName

public java.lang.String getTableName(DatasourceInfo datasourceInfo)
The table-name of the Entity including a Schema name if specified in the datasource config


setTableName

public void setTableName(java.lang.String tableName)

getPackageName

public java.lang.String getPackageName()
The package-name of the Entity


setPackageName

public void setPackageName(java.lang.String packageName)

getDefaultResourceName

public java.lang.String getDefaultResourceName()
The default-resource-name of the Entity


setDefaultResourceName

public void setDefaultResourceName(java.lang.String defaultResourceName)

getDependentOn

public java.lang.String getDependentOn()
The entity-name of the Entity that this Entity is dependent on, if empty then no dependency


setDependentOn

public void setDependentOn(java.lang.String dependentOn)

getNeverCache

public boolean getNeverCache()
An indicator to specify if this entity is never cached. If true causes the delegator to not clear caches on write and to not get from cache on read showing a warning messages to that effect


setNeverCache

public void setNeverCache(boolean neverCache)

getAutoClearCache

public boolean getAutoClearCache()

setAutoClearCache

public void setAutoClearCache(boolean autoClearCache)

getHasFieldWithAuditLog

public boolean getHasFieldWithAuditLog()

getLocation

public java.lang.String getLocation()

setLocation

public void setLocation(java.lang.String location)

getDoLock

public boolean getDoLock()
An indicator to specify if this entity requires locking for updates


setDoLock

public void setDoLock(boolean doLock)

lock

public boolean lock()

getSequenceBankSize

public java.lang.Integer getSequenceBankSize()

updatePkLists

public void updatePkLists()

isField

public boolean isField(java.lang.String fieldName)

areFields

public boolean areFields(java.util.Collection<java.lang.String> fieldNames)

getPksSize

public int getPksSize()

getPk

public ModelField getPk(int index)
Deprecated. 


getOnlyPk

public ModelField getOnlyPk()

getPksIterator

public java.util.Iterator<ModelField> getPksIterator()

getPksCopy

public java.util.List<ModelField> getPksCopy()
Deprecated. Use getPkFieldsUnmodifiable instead.


getPkFieldsUnmodifiable

public java.util.List<ModelField> getPkFieldsUnmodifiable()

getFirstPkFieldName

public java.lang.String getFirstPkFieldName()

getNopksSize

public int getNopksSize()

getNopk

public ModelField getNopk(int index)
Deprecated. 


getNopksIterator

public java.util.Iterator<ModelField> getNopksIterator()

getNopksCopy

public java.util.List<ModelField> getNopksCopy()

getFieldsSize

public int getFieldsSize()

getField

public ModelField getField(int index)
Deprecated. 


getFieldsIterator

public java.util.Iterator<ModelField> getFieldsIterator()

getFieldsCopy

public java.util.List<ModelField> getFieldsCopy()
Deprecated. Use getFieldsUnmodifiable instead.


getFieldsUnmodifiable

public java.util.List<ModelField> getFieldsUnmodifiable()

getColNameOrAlias

public java.lang.String getColNameOrAlias(java.lang.String fieldName)
The col-name of the Field, the alias of the field if this is on a view-entity


getField

public ModelField getField(java.lang.String fieldName)

createFieldsMap

protected void createFieldsMap()

addField

public void addField(ModelField field)

removeField

public ModelField removeField(int index)

removeField

public ModelField removeField(java.lang.String fieldName)

getAllFieldNames

public java.util.List<java.lang.String> getAllFieldNames()

getPkFieldNames

public java.util.List<java.lang.String> getPkFieldNames()

getNoPkFieldNames

public java.util.List<java.lang.String> getNoPkFieldNames()

getFieldNamesFromFieldVector

public java.util.List<java.lang.String> getFieldNamesFromFieldVector(ModelField... modelFields)

getFieldNamesFromFieldVector

public java.util.List<java.lang.String> getFieldNamesFromFieldVector(java.util.List<ModelField> modelFields)

getRelationsSize

public int getRelationsSize()

getRelationsOneSize

public int getRelationsOneSize()

getRelation

public ModelRelation getRelation(int index)

getRelationsIterator

public java.util.Iterator<ModelRelation> getRelationsIterator()

getRelationsList

public java.util.List<ModelRelation> getRelationsList(boolean includeOne,
                                                      boolean includeOneNoFk,
                                                      boolean includeMany)

getRelationsOneList

public java.util.List<ModelRelation> getRelationsOneList()

getRelationsManyList

public java.util.List<ModelRelation> getRelationsManyList()

getRelation

public ModelRelation getRelation(java.lang.String relationName)

addRelation

public void addRelation(ModelRelation relation)

removeRelation

public ModelRelation removeRelation(int index)

getIndexesSize

public int getIndexesSize()

getIndex

public ModelIndex getIndex(int index)

getIndexesIterator

public java.util.Iterator<ModelIndex> getIndexesIterator()

getIndex

public ModelIndex getIndex(java.lang.String indexName)

addIndex

public void addIndex(ModelIndex index)

removeIndex

public ModelIndex removeIndex(int index)

getViewEntitiesSize

public int getViewEntitiesSize()

getViewEntity

public ModelViewEntity getViewEntity(java.lang.String viewEntityName)

getViewConvertorsIterator

public java.util.Iterator<java.util.Map.Entry<java.lang.String,ModelViewEntity>> getViewConvertorsIterator()

addViewEntity

public void addViewEntity(ModelViewEntity view)

convertToViewValues

public java.util.List<? extends java.util.Map<java.lang.String,java.lang.Object>> convertToViewValues(java.lang.String viewEntityName,
                                                                                                      GenericEntity entity)

removeViewEntity

public ModelViewEntity removeViewEntity(java.lang.String viewEntityName)

removeViewEntity

public ModelViewEntity removeViewEntity(ModelViewEntity viewEntity)

nameString

public java.lang.String nameString(java.util.List<ModelField> flds)

nameString

public java.lang.String nameString(java.util.List<ModelField> flds,
                                   java.lang.String separator,
                                   java.lang.String afterLast)

typeNameString

public java.lang.String typeNameString(ModelField... flds)

typeNameString

public java.lang.String typeNameString(java.util.List<ModelField> flds)

fieldNameString

public java.lang.String fieldNameString()

fieldNameString

public java.lang.String fieldNameString(java.lang.String separator,
                                        java.lang.String afterLast)

fieldTypeNameString

public java.lang.String fieldTypeNameString()

primKeyClassNameString

public java.lang.String primKeyClassNameString()

pkNameString

public java.lang.String pkNameString()

pkNameString

public java.lang.String pkNameString(java.lang.String separator,
                                     java.lang.String afterLast)

nonPkNullList

public java.lang.String nonPkNullList()

fieldsStringList

public java.lang.String fieldsStringList(java.lang.String eachString,
                                         java.lang.String separator,
                                         ModelField... flds)

fieldsStringList

public java.lang.String fieldsStringList(java.util.List<ModelField> flds,
                                         java.lang.String eachString,
                                         java.lang.String separator)

fieldsStringList

public java.lang.String fieldsStringList(java.lang.String eachString,
                                         java.lang.String separator,
                                         boolean appendIndex,
                                         ModelField... flds)

fieldsStringList

public java.lang.String fieldsStringList(java.util.List<ModelField> flds,
                                         java.lang.String eachString,
                                         java.lang.String separator,
                                         boolean appendIndex)

fieldsStringList

public java.lang.String fieldsStringList(java.lang.String eachString,
                                         java.lang.String separator,
                                         boolean appendIndex,
                                         boolean onlyNonPK,
                                         ModelField... flds)

fieldsStringList

public java.lang.String fieldsStringList(java.util.List<ModelField> flds,
                                         java.lang.String eachString,
                                         java.lang.String separator,
                                         boolean appendIndex,
                                         boolean onlyNonPK)

colNameString

public java.lang.String colNameString(ModelField... flds)

colNameString

public java.lang.String colNameString(java.util.List<ModelField> flds)

colNameString

public java.lang.String colNameString(java.lang.String separator,
                                      java.lang.String afterLast,
                                      boolean alias,
                                      ModelField... flds)

colNameString

public java.lang.String colNameString(java.util.List<ModelField> flds,
                                      java.lang.String separator,
                                      java.lang.String afterLast,
                                      boolean alias)

classNameString

public java.lang.String classNameString(ModelField... flds)

classNameString

public java.lang.String classNameString(java.util.List<ModelField> flds)

classNameString

public java.lang.String classNameString(java.lang.String separator,
                                        java.lang.String afterLast,
                                        ModelField... flds)

classNameString

public java.lang.String classNameString(java.util.List<ModelField> flds,
                                        java.lang.String separator,
                                        java.lang.String afterLast)

finderQueryString

public java.lang.String finderQueryString(ModelField... flds)

finderQueryString

public java.lang.String finderQueryString(java.util.List<ModelField> flds)

httpArgList

public java.lang.String httpArgList(ModelField... flds)

httpArgList

public java.lang.String httpArgList(java.util.List<ModelField> flds)

httpArgListFromClass

public java.lang.String httpArgListFromClass(ModelField... flds)

httpArgListFromClass

public java.lang.String httpArgListFromClass(java.util.List<ModelField> flds)

httpArgListFromClass

public java.lang.String httpArgListFromClass(java.lang.String entityNameSuffix,
                                             ModelField... flds)

httpArgListFromClass

public java.lang.String httpArgListFromClass(java.util.List<ModelField> flds,
                                             java.lang.String entityNameSuffix)

httpRelationArgList

public java.lang.String httpRelationArgList(ModelRelation relation,
                                            ModelField... flds)

httpRelationArgList

public java.lang.String httpRelationArgList(java.util.List<ModelField> flds,
                                            ModelRelation relation)

typeNameStringRelatedNoMapped

public java.lang.String typeNameStringRelatedNoMapped(ModelRelation relation,
                                                      ModelField... flds)

typeNameStringRelatedNoMapped

public java.lang.String typeNameStringRelatedNoMapped(java.util.List<ModelField> flds,
                                                      ModelRelation relation)

typeNameStringRelatedAndMain

public java.lang.String typeNameStringRelatedAndMain(ModelRelation relation,
                                                     ModelField... flds)

typeNameStringRelatedAndMain

public java.lang.String typeNameStringRelatedAndMain(java.util.List<ModelField> flds,
                                                     ModelRelation relation)

compareTo

public int compareTo(ModelEntity otherModelEntity)
Specified by:
compareTo in interface java.lang.Comparable<ModelEntity>

convertFieldMapInPlace

public void convertFieldMapInPlace(java.util.Map<java.lang.String,java.lang.Object> inContext,
                                   GenericDelegator delegator)

convertFieldValue

public java.lang.Object convertFieldValue(java.lang.String fieldName,
                                          java.lang.Object value,
                                          GenericDelegator delegator)

convertFieldValue

public java.lang.Object convertFieldValue(ModelField modelField,
                                          java.lang.Object value,
                                          GenericDelegator delegator)

convertFieldValue

public java.lang.Object convertFieldValue(ModelField modelField,
                                          java.lang.Object value,
                                          GenericDelegator delegator,
                                          java.util.Map<java.lang.String,? extends java.lang.Object> context)
Convert a field value from one Java data type to another. This is the preferred method - which takes into consideration the user's locale and time zone (for conversions that require them).

Parameters:
modelField -
value -
delegator -
context -
Returns:
the converted value

getNoAutoStamp

public boolean getNoAutoStamp()
Returns:
Returns the noAutoStamp.

setNoAutoStamp

public void setNoAutoStamp(boolean noAutoStamp)
Parameters:
noAutoStamp - The noAutoStamp to set.

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,
                                        java.lang.String packageName)

toXmlElement

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

writeEoModelText

public void writeEoModelText(java.io.PrintWriter writer,
                             java.lang.String entityPrefix,
                             java.lang.String helperName,
                             java.util.Set<java.lang.String> entityNameIncludeSet,
                             ModelReader entityModelReader)
                      throws GenericEntityException
Writes entity model information in the Apple EOModelBundle format. For document structure and definition see: http://developer.apple.com/documentation/InternetWeb/Reference/WO_BundleReference/Articles/EOModelBundle.html For examples see the JavaRealEstate.framework and JavaBusinessLogic.framework packages which are in the /Library/Frameworks directory after installing the WebObjects Examples package (get latest version of WebObjects download for this). This is based on examples and documentation from WebObjects 5.4, downloaded 20080221.

Parameters:
writer -
entityPrefix -
helperName -
Throws:
GenericEntityException

createEoModelMap

public java.util.Map<java.lang.String,java.lang.Object> createEoModelMap(java.lang.String entityPrefix,
                                                                         java.lang.String helperName,
                                                                         java.util.Set<java.lang.String> entityNameIncludeSet,
                                                                         ModelReader entityModelReader)
                                                                  throws GenericEntityException
Throws:
GenericEntityException