|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gammastream.validity.GSVModel
GSVModel used for the mapping validation rules to an entities' attributes.
The structure is very similar to Apple's EOModel.
Field Summary | |
static String |
MODEL_EXTENSION
The extension of the GSVModel file included in the '.eomodeld' wrapper. |
static String |
MODEL_NAME
The name of the GSVModel file included in the '.eomodeld' wrapper. |
Constructor Summary | |
GSVModel(String path)
Creates a new GSVModel using the path to an '.eomodeld' file. |
|
GSVModel(WOXMLDecoder decoder)
WOXMLCoding Impl |
Method Summary | |
void |
addEntity(GSVEntity newEntity)
Adds a GSVEntity object to this GSVModel. |
Class |
classForCoder()
WOXMLCoding Impl |
void |
encodeWithWOXMLCoder(WOXMLCoder coder)
WOXMLCoding Impl |
NSArray |
entities()
Returns the NSArray of GSVEntity Objects. |
GSVEntity |
entityForObject(Object object)
Returns the GSVEntity object associated with the provided EOEnterpriseObject. |
GSVEntity |
entityNamed(String name)
Returns the GSVEntity object for the provided entity name. |
NSArray |
entityNames()
Returns an NSArray containing the GSVEntity names. |
EOModelGroup |
eomodelGroup()
Returns the EOModelGroup that is being used to query information from the EOModel. |
String |
eomodelName()
Returns the EOModel Name for the associated GSVModel. |
String |
eomodelPath()
Returns the path of the '.eomodeld' file. |
void |
init(EOModel eomodel)
|
void |
removeEntity(GSVEntity oldEntity)
Removes a GSVEntity object from this GSVModel. |
boolean |
saveModel()
Saves the GSVModel to inside the '.eomodeld' file wrapper. |
void |
savePath(String s)
Internal method for saving paths |
void |
setEomodelPath(String path)
Set the path of the EOModel file. |
boolean |
validateEOModelForPath(String path)
Determines that there is indeed a file located at the given path. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String MODEL_NAME
public static final String MODEL_EXTENSION
Constructor Detail |
public GSVModel(String path) throws IllegalArgumentException
EOModel eoModel = EOModelGroup.defaultGroup().modelNamed("Moview");
GSVModel model = new GSVModel(eoModel.path());
path
- Path to an '.eomodeld' file.
IllegalArgumentException
- Thrown if valid '.eomodeld' file does not exist at the specified path.public GSVModel(WOXMLDecoder decoder)
decoder
- WOXMLDecoderencodeWithWOXMLCoder(com.webobjects.appserver.xml.WOXMLCoder)
Method Detail |
public boolean validateEOModelForPath(String path)
path
- Path to the desired '.eomodeld' file.
true
if an '.eomodeld' file is located at the given path; otherwise, we return false
.public boolean saveModel()
true
if save is successful; otherwise, returns false
.public EOModelGroup eomodelGroup()
public String eomodelName()
public String eomodelPath()
setEomodelPath(java.lang.String)
public void setEomodelPath(String path)
path
- Path of the EOModel File.eomodelPath()
public NSArray entities()
addEntity(com.gammastream.validity.GSVEntity)
,
removeEntity(com.gammastream.validity.GSVEntity)
public void addEntity(GSVEntity newEntity) throws IllegalArgumentException
newEntity
- GSVEntity object
IllegalArgumentException
- GSVEnitity already exsits.entities()
,
removeEntity(com.gammastream.validity.GSVEntity)
public void removeEntity(GSVEntity oldEntity)
oldEntity
- GSVEntity object to remove.entities()
,
addEntity(com.gammastream.validity.GSVEntity)
public GSVEntity entityForObject(Object object)
object
- EOEnterpriseObject
entityNamed(java.lang.String)
public GSVEntity entityNamed(String name)
name
- name of entity
null
if it could not be found.entityForObject(java.lang.Object)
public NSArray entityNames()
public void savePath(String s)
public void encodeWithWOXMLCoder(WOXMLCoder coder)
encodeWithWOXMLCoder
in interface WOXMLCoding
coder
- WOXMLCoderGSVModel(com.webobjects.appserver.xml.WOXMLDecoder)
public Class classForCoder()
classForCoder
in interface WOXMLCoding
public void init(EOModel eomodel)
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |