|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.corrspt.xeo.api.core.AbstractModelWrapper
public class AbstractModelWrapper
Base class for the wrappers around instances XEO Models
Nested Class Summary | |
---|---|
static class |
AbstractModelWrapper.SystemAtts
Enumeration of System Attributes |
Field Summary | |
---|---|
protected netgest.bo.runtime.boObject |
object
The instance to wrap |
Constructor Summary | |
---|---|
protected |
AbstractModelWrapper(netgest.bo.runtime.boObject obj)
Constructor from a given instance |
protected |
AbstractModelWrapper(long boui,
netgest.bo.runtime.EboContext ctx)
Constructor from a BOUI |
Method Summary | |
---|---|
void |
addErrorMessage(java.lang.String errorMessage)
Adds a new error message to the instance |
protected void |
checkEboContextIsActive()
|
protected void |
checkObjectLoaded()
Checks if the object is loaded and if not, attempts to load it |
void |
clearAttributeErrors()
Clears all errors associated to attributes |
void |
clearErrors()
Clears the list of errors (instance and object) |
void |
clearObjectErrors()
Clears errors of the instance |
void |
destroy()
Deletes this instance |
void |
disable()
Disables all attributes in the instance |
void |
enable()
Enables the instance (sets all attributes to enabled) |
boolean |
exists()
Checks whether the object is persisted in the database or not |
BOUI |
getBoui()
Retrieves the BOUI of the instance |
java.lang.String |
getCardId()
Retrieves the textual card id |
java.lang.String |
getCardIdIcon()
Retrieves the CardId with the icon as a string |
java.util.Date |
getDateCreate()
Retrieve the date of creation for this object |
java.util.Date |
getDateLastUpdate()
Retrieve the date of the lastupdate to this instance |
netgest.bo.runtime.EboContext |
getEboContext()
Retrieves the EboContext associated to this object |
netgest.bo.runtime.boObject |
getOriginal()
Retrieves the original instance |
BaseModel |
getParent()
Returns the parent object for this instance |
java.lang.String |
getXeoModelName()
Retrieve the name of the Model |
boolean |
hasAttributeErrors()
Checks whether the instance has errors in its attributes |
boolean |
hasErrors()
Checks whether the instance has errors (either object or attribute errors) |
boolean |
hasErrorsInObjectOnly()
Checks whether there are errors in the instance (does not include attribute errors) |
boolean |
hasParent()
Checks whether this object has a parent object |
boolean |
isChanged()
Whether the instance was changed since it was first loaded |
boolean |
isDisabled()
Checks whether the instance is disabled not |
boolean |
isEnabled()
Checks whether the instance is enabled or not |
boolean |
isSame(BaseModel model)
Whether the instance is the same as the passed one |
boolean |
isValid()
Whether the instance is valid or not |
void |
setParent(BaseModel parent)
Sets the parent for this instance |
java.lang.String |
toString()
|
void |
update()
Saves the instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected netgest.bo.runtime.boObject object
Constructor Detail |
---|
protected AbstractModelWrapper(netgest.bo.runtime.boObject obj)
obj
- The instance to wrapprotected AbstractModelWrapper(long boui, netgest.bo.runtime.EboContext ctx)
boui
- The boui to load fromctx
- The EboContextMethod Detail |
---|
protected void checkEboContextIsActive()
protected void checkObjectLoaded()
netgest.bo.runtime.boRuntimeException
public void update() throws netgest.bo.runtime.boRuntimeException
update
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public void destroy() throws netgest.bo.runtime.boRuntimeException
destroy
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public netgest.bo.runtime.boObject getOriginal()
getOriginal
in interface BaseModel
boObject
instancepublic java.lang.String getCardId()
getCardId
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public java.lang.String getCardIdIcon()
getCardIdIcon
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public java.lang.String getXeoModelName()
getXeoModelName
in interface BaseModel
public java.lang.String toString()
toString
in class java.lang.Object
public void addErrorMessage(java.lang.String errorMessage)
addErrorMessage
in interface BaseModel
errorMessage
- The error messagepublic boolean hasErrors()
hasErrors
in interface BaseModel
public boolean hasAttributeErrors()
hasAttributeErrors
in interface BaseModel
public boolean hasErrorsInObjectOnly()
hasErrorsInObjectOnly
in interface BaseModel
public boolean exists()
exists
in interface BaseModel
public void clearErrors()
clearErrors
in interface BaseModel
public void clearObjectErrors()
clearObjectErrors
in interface BaseModel
public void clearAttributeErrors()
clearAttributeErrors
in interface BaseModel
public boolean isChanged()
isChanged
in interface BaseModel
public void disable()
disable
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public boolean isDisabled()
isDisabled
in interface BaseModel
public void enable()
enable
in interface BaseModel
public boolean isEnabled()
isEnabled
in interface BaseModel
public void setParent(BaseModel parent)
setParent
in interface BaseModel
parent
- The parentpublic netgest.bo.runtime.EboContext getEboContext()
getEboContext
in interface BaseModel
public BOUI getBoui()
getBoui
in interface BaseModel
public java.util.Date getDateCreate()
getDateCreate
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public java.util.Date getDateLastUpdate()
getDateLastUpdate
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public boolean hasParent()
hasParent
in interface BaseModel
netgest.bo.runtime.boRuntimeException
public BaseModel getParent()
getParent
in interface BaseModel
public boolean isSame(BaseModel model)
BaseModel
isSame
in interface BaseModel
model
- The instance to compare
public boolean isValid()
BaseModel
isValid
in interface BaseModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |