public class ModelReader extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,ModelEntity> |
entityCache |
protected Map<String,ResourceHandler> |
entityResourceHandlerMap
for each entity contains a map to the ResourceHandler that the entity came from
|
protected Collection<ResourceHandler> |
entityResourceHandlers
collection of filenames for entity definitions
|
protected String |
modelName |
static String |
module |
protected int |
numEntities |
protected int |
numFields |
protected int |
numRelations |
protected int |
numViewEntities |
static UtilCache<String,ModelReader> |
readers |
protected Map<ResourceHandler,Collection<String>> |
resourceHandlerEntities
contains a collection of entity names for each ResourceHandler, populated as they are loaded
|
| Constructor and Description |
|---|
ModelReader(String modelName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntityToResourceHandler(String entityName,
String loaderName,
String location) |
ModelField |
createModelField(Element fieldElement,
Element docElement,
Hashtable<String,String> docElementValues) |
ModelRelation |
createRelation(ModelEntity entity,
Element relationElement) |
ModelField |
findModelField(ModelEntity entity,
String fieldName) |
Map<String,ModelEntity> |
getEntityCache() |
Collection<String> |
getEntityNames()
Creates a Collection with the entityName of each Entity defined in the specified XML Entity Descriptor file.
|
Iterator<String> |
getEntityNamesIterator()
Creates a Iterator with the entityName of each Entity defined in the specified XML Entity Descriptor file.
|
ResourceHandler |
getEntityResourceHandler(String entityName) |
ModelEntity |
getModelEntity(String entityName)
Gets an Entity object based on a definition from the specified XML Entity descriptor file.
|
static ModelReader |
getModelReader(String delegatorName) |
Collection<String> |
getResourceHandlerEntities(ResourceHandler resourceHandler) |
Iterator<ResourceHandler> |
getResourceHandlerEntitiesKeyIterator() |
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.
|
public static final String module
public static UtilCache<String,ModelReader> readers
protected Map<String,ModelEntity> entityCache
protected int numEntities
protected int numViewEntities
protected int numFields
protected int numRelations
protected String modelName
protected Collection<ResourceHandler> entityResourceHandlers
protected Map<ResourceHandler,Collection<String>> resourceHandlerEntities
protected Map<String,ResourceHandler> entityResourceHandlerMap
public ModelReader(String modelName) throws GenericEntityException
GenericEntityExceptionpublic static ModelReader getModelReader(String delegatorName) throws GenericEntityException
GenericEntityExceptionpublic Map<String,ModelEntity> getEntityCache() throws GenericEntityException
GenericEntityExceptionpublic void rebuildResourceHandlerEntities()
public Iterator<ResourceHandler> getResourceHandlerEntitiesKeyIterator()
public Collection<String> getResourceHandlerEntities(ResourceHandler resourceHandler)
public void addEntityToResourceHandler(String entityName, String loaderName, String location)
public ResourceHandler getEntityResourceHandler(String entityName)
public ModelEntity getModelEntity(String entityName) throws GenericEntityException
entityName - The entityName of the Entity definition to use.GenericEntityExceptionpublic Iterator<String> getEntityNamesIterator() throws GenericEntityException
GenericEntityExceptionpublic Collection<String> getEntityNames() throws GenericEntityException
GenericEntityExceptionpublic ModelRelation createRelation(ModelEntity entity, Element relationElement)
public ModelField findModelField(ModelEntity entity, String fieldName)
Copyright © 2015 Atlassian. All rights reserved.