Package org.ofbiz.core.entity.model
Class ModelReader
java.lang.Object
org.ofbiz.core.entity.model.ModelReader
Generic Entity - Entity Definition Reader
- Since:
- 2.0
- Version:
- $Revision: 1.1 $
- Author:
- David E. Jones, Andy Zeneski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,ModelEntity> protected Map<String,ResourceHandler> for each entity contains a map to the ResourceHandler that the entity came fromprotected Collection<ResourceHandler>collection of filenames for entity definitionsprotected Stringstatic final Stringprotected intprotected intprotected intprotected intstatic final UtilCache<String,ModelReader> protected Map<ResourceHandler,Collection<String>> contains a collection of entity names for each ResourceHandler, populated as they are loaded -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntityToResourceHandler(String entityName, String loaderName, String location) createModelField(Element fieldElement, Element docElement, Hashtable<String, String> docElementValues) createRelation(ModelEntity entity, Element relationElement) findModelField(ModelEntity entity, String fieldName) Creates a Collection with the entityName of each Entity defined in the specified XML Entity Descriptor file.Creates a Iterator with the entityName of each Entity defined in the specified XML Entity Descriptor file.getEntityResourceHandler(String entityName) getModelEntity(String entityName) Gets an Entity object based on a definition from the specified XML Entity descriptor file.static ModelReadergetModelReader(String delegatorName) getResourceHandlerEntities(ResourceHandler resourceHandler) voidrebuilds the resourceHandlerEntities Map of Collections based on the current entityResourceHandlerMap Map, must be done whenever a manual change is made to the entityResourceHandlerMap Map after the initial load to make them consistent again.
-
Field Details
-
module
-
readers
-
entityCache
-
numEntities
protected int numEntities -
numViewEntities
protected int numViewEntities -
numFields
protected int numFields -
numRelations
protected int numRelations -
modelName
-
entityResourceHandlers
collection of filenames for entity definitions -
resourceHandlerEntities
contains a collection of entity names for each ResourceHandler, populated as they are loaded -
entityResourceHandlerMap
for each entity contains a map to the ResourceHandler that the entity came from
-
-
Constructor Details
-
ModelReader
- Throws:
GenericEntityException
-
-
Method Details
-
getModelReader
- Throws:
GenericEntityException
-
getEntityCache
- Throws:
GenericEntityException
-
rebuildResourceHandlerEntities
public void rebuildResourceHandlerEntities()rebuilds the resourceHandlerEntities Map of Collections based on the current entityResourceHandlerMap Map, must be done whenever a manual change is made to the entityResourceHandlerMap Map after the initial load to make them consistent again. -
getResourceHandlerEntitiesKeyIterator
-
getResourceHandlerEntities
-
addEntityToResourceHandler
-
getEntityResourceHandler
-
getModelEntity
Gets an Entity object based on a definition from the specified XML Entity descriptor file.- Parameters:
entityName- The entityName of the Entity definition to use.- Returns:
- An Entity object describing the specified entity of the specified descriptor file.
- Throws:
GenericEntityException
-
getEntityNamesIterator
Creates a Iterator with the entityName of each Entity defined in the specified XML Entity Descriptor file.- Returns:
- A Iterator of entityName Strings
- Throws:
GenericEntityException
-
getEntityNames
Creates a Collection with the entityName of each Entity defined in the specified XML Entity Descriptor file.- Returns:
- A Collection of entityName Strings
- Throws:
GenericEntityException
-
createRelation
-
findModelField
-
createModelField
-