|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.wocompat.EOModelHelper
public class EOModelHelper
Helper class used by EOModelProcessor. EOModelHelper loads an EOModel from the specified location and gives its users access to the untyped EOModel information.
Field Summary | |
---|---|
protected DataMap |
dataMap
|
protected Map |
entityClassIndex
|
protected Map |
entityClientClassIndex
|
protected Map |
entityIndex
|
protected Map |
entityQueryIndex
|
protected URL |
modelUrl
|
Constructor Summary | |
---|---|
EOModelHelper(String path)
Creates helper instance and tries to locate EOModel and load index file. |
Method Summary | |
---|---|
String |
entityClass(String entityName,
boolean getClientClass)
|
Map |
entityPListMap(String entityName)
Returns an info map for the entity called entityName . |
protected String |
findModelName(String path)
Returns EOModel name based on its path. |
protected URL |
findModelUrl(String path)
Returns a URL of the EOModel directory. |
DataMap |
getDataMap()
Returns a DataMap associated with this helper. |
URL |
getModelUrl()
Returns EOModel location as URL. |
Map |
getPrototypeAttributeMapFor(String aPrototypeAttributeName)
|
String |
javaTypeForEOModelerType(String valueClassName,
String valueType)
Performs Objective C data types conversion to Java types. |
protected Map |
loadEntityIndex(String entityName)
Loads EOEntity information and returns it as a map. |
protected Map |
loadModelIndex()
Loads EOModel index and returns it as a map. |
protected Map |
loadQueryIndex(String entityName)
Loads EOFetchSpecification information and returns it as a map. |
Iterator |
modelNames()
Returns an iterator of model names. |
List |
modelNamesAsList()
Returns a list of model entity names. |
protected Class |
numericAttributeClass(String valueType)
|
protected InputStream |
openEntityStream(String entityName)
Returns InputStream to read an EOEntity plist file. |
protected InputStream |
openIndexStream()
Returns InputStream to read an EOModel index file. |
protected InputStream |
openQueryStream(String entityName)
Returns InputStream to read an EOFetchSpecification plist file. |
Iterator |
queryNames(String entityName)
Returns the iterator over EOFetchSpecification names for a given entity. |
Map |
queryPListMap(String entityName,
String queryName)
Returns a map containing EOFetchSpecification information for entity name and query name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected URL modelUrl
protected Map entityIndex
protected Map entityClassIndex
protected Map entityQueryIndex
protected Map entityClientClassIndex
protected DataMap dataMap
Constructor Detail |
---|
public EOModelHelper(String path) throws Exception
Exception
Method Detail |
---|
public String javaTypeForEOModelerType(String valueClassName, String valueType)
protected Class numericAttributeClass(String valueType)
public DataMap getDataMap()
public URL getModelUrl()
public Iterator modelNames()
public List modelNamesAsList()
public Map getPrototypeAttributeMapFor(String aPrototypeAttributeName)
public Map entityPListMap(String entityName)
entityName
.
public Iterator queryNames(String entityName)
public Map queryPListMap(String entityName, String queryName)
public String entityClass(String entityName, boolean getClientClass)
protected Map loadModelIndex() throws Exception
Exception
protected Map loadEntityIndex(String entityName) throws Exception
Exception
protected Map loadQueryIndex(String entityName) throws Exception
Exception
protected String findModelName(String path)
protected URL findModelUrl(String path)
protected InputStream openIndexStream() throws Exception
Exception
protected InputStream openEntityStream(String entityName) throws Exception
entityName
- name of EOEntity to be loaded.
entityname.plist
file can not be located.
Exception
protected InputStream openQueryStream(String entityName) throws Exception
entityName
- name of EOEntity to be loaded.
entityname.plist
file can not be located.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |