|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gammastream.validity.GSVModel
public final class GSVModel
GSVModel used for the mapping validation rules to an entities' attributes.
The structure is very similar to Apple's EOModel.
Field Summary | |
---|---|
static java.lang.String |
MODEL_EXTENSION
The extension of the GSVModel file included in the '.eomodeld' wrapper. Currently the full name is: 'Validity.model' |
static java.lang.String |
MODEL_NAME
The name of the GSVModel file included in the '.eomodeld' wrapper. Currently the full name is: 'Validity.model' |
Constructor Summary | |
---|---|
GSVModel(java.lang.String path)
Creates a new GSVModel using the path to an '.eomodeld' file. Example of creating a GSVModel for the Movies example which ships with WebObjects.
EOModel eoModel = EOModelGroup.defaultGroup().modelNamed("Moview");
|
|
GSVModel(com.webobjects.appserver.xml.WOXMLDecoder decoder)
WOXMLCoding Impl |
Method Summary | |
---|---|
void |
addEntity(GSVEntity newEntity)
Adds a GSVEntity object to this GSVModel. |
java.lang.Class |
classForCoder()
WOXMLCoding Impl |
void |
encodeWithWOXMLCoder(com.webobjects.appserver.xml.WOXMLCoder coder)
WOXMLCoding Impl |
com.webobjects.foundation.NSArray |
entities()
Returns the NSArray of GSVEntity Objects. |
GSVEntity |
entityForObject(java.lang.Object object)
Returns the GSVEntity object associated with the provided EOEnterpriseObject. |
GSVEntity |
entityNamed(java.lang.String name)
Returns the GSVEntity object for the provided entity name. |
com.webobjects.foundation.NSArray |
entityNames()
Returns an NSArray containing the GSVEntity names. |
com.webobjects.eoaccess.EOModelGroup |
eomodelGroup()
Returns the EOModelGroup that is being used to query information from the EOModel. |
java.lang.String |
eomodelName()
Returns the EOModel Name for the associated GSVModel. |
java.lang.String |
eomodelPath()
Returns the path of the '.eomodeld' file. |
void |
init(com.webobjects.eoaccess.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(java.lang.String s)
Internal method for saving paths |
void |
setEomodelPath(java.lang.String path)
Set the path of the EOModel file. |
boolean |
validateEOModelForPath(java.lang.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 java.lang.String MODEL_NAME
public static final java.lang.String MODEL_EXTENSION
Constructor Detail |
---|
public GSVModel(java.lang.String path) throws java.lang.IllegalArgumentException
EOModel eoModel = EOModelGroup.defaultGroup().modelNamed("Moview");
GSVModel model = new GSVModel(eoModel.path());
path
- Path to an '.eomodeld' file.
java.lang.IllegalArgumentException
- Thrown if valid '.eomodeld' file does not exist at the specified path.public GSVModel(com.webobjects.appserver.xml.WOXMLDecoder decoder)
decoder
- WOXMLDecoderencodeWithWOXMLCoder(com.webobjects.appserver.xml.WOXMLCoder)
Method Detail |
---|
public boolean validateEOModelForPath(java.lang.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 com.webobjects.eoaccess.EOModelGroup eomodelGroup()
public java.lang.String eomodelName()
public java.lang.String eomodelPath()
setEomodelPath(java.lang.String)
public void setEomodelPath(java.lang.String path)
path
- Path of the EOModel File.eomodelPath()
public com.webobjects.foundation.NSArray entities()
addEntity(com.gammastream.validity.GSVEntity)
,
removeEntity(com.gammastream.validity.GSVEntity)
public void addEntity(GSVEntity newEntity) throws java.lang.IllegalArgumentException
newEntity
- GSVEntity object
java.lang.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(java.lang.Object object)
object
- EOEnterpriseObject
entityNamed(java.lang.String)
public GSVEntity entityNamed(java.lang.String name)
name
- name of entity
null
if it could not be found.entityForObject(java.lang.Object)
public com.webobjects.foundation.NSArray entityNames()
public void savePath(java.lang.String s)
public void encodeWithWOXMLCoder(com.webobjects.appserver.xml.WOXMLCoder coder)
encodeWithWOXMLCoder
in interface com.webobjects.appserver.xml.WOXMLCoding
coder
- WOXMLCoderGSVModel(com.webobjects.appserver.xml.WOXMLDecoder)
public java.lang.Class classForCoder()
classForCoder
in interface com.webobjects.appserver.xml.WOXMLCoding
public void init(com.webobjects.eoaccess.EOModel eomodel)
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |