com.corrspt.xeo.api.core
Interface BaseModel

All Known Implementing Classes:
AbstractJSONImplementation, AbstractModelWrapper, XEOObject

public interface BaseModel


Method Summary
 void addErrorMessage(java.lang.String errorMessage)
          Adds a new error message to the instance
 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 last update 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 o)
          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
 void update()
          Saves the instance
 

Method Detail

update

void update()
            throws netgest.bo.runtime.boRuntimeException
Saves the instance

Throws:
netgest.bo.runtime.boRuntimeException

destroy

void destroy()
             throws netgest.bo.runtime.boRuntimeException
Deletes this instance

Throws:
netgest.bo.runtime.boRuntimeException

getOriginal

netgest.bo.runtime.boObject getOriginal()
Retrieves the original instance

Returns:
The original boObject instance

getCardId

java.lang.String getCardId()
Retrieves the textual card id

Returns:
A String with the card id

getCardIdIcon

java.lang.String getCardIdIcon()
Retrieves the CardId with the icon as a string

Returns:
An Html String with the icon and the Card id

getXeoModelName

java.lang.String getXeoModelName()
Retrieve the name of the Model

Returns:
A string with the name of the model

addErrorMessage

void addErrorMessage(java.lang.String errorMessage)
Adds a new error message to the instance

Parameters:
errorMessage - The error message

hasErrors

boolean hasErrors()
Checks whether the instance has errors (either object or attribute errors)

Returns:
True if the instance has errors and false otherwise

hasAttributeErrors

boolean hasAttributeErrors()
Checks whether the instance has errors in its attributes

Returns:
True if any error has an attribute and false otherwise

hasErrorsInObjectOnly

boolean hasErrorsInObjectOnly()
Checks whether there are errors in the instance (does not include attribute errors)

Returns:
True if the instance (not its attribute) has errors

exists

boolean exists()
Checks whether the object is persisted in the database or not

Returns:
True if the object exists in the database and false otherwise

clearErrors

void clearErrors()
Clears the list of errors (instance and object)


clearObjectErrors

void clearObjectErrors()
Clears errors of the instance


clearAttributeErrors

void clearAttributeErrors()
Clears all errors associated to attributes


isChanged

boolean isChanged()
Whether the instance was changed since it was first loaded

Returns:
True if the instance was changed since it was first loaded and false otherwise

disable

void disable()
Disables all attributes in the instance


isDisabled

boolean isDisabled()
Checks whether the instance is disabled not

Returns:
True if the instance is disabled and false otherwise

enable

void enable()
Enables the instance (sets all attributes to enabled)


isEnabled

boolean isEnabled()
Checks whether the instance is enabled or not

Returns:
True if the instance is enabled and false otherwise

setParent

void setParent(BaseModel parent)
Sets the parent for this instance

Parameters:
parent - The parent

getEboContext

netgest.bo.runtime.EboContext getEboContext()
Retrieves the EboContext associated to this object

Returns:
The EboContext

getBoui

BOUI getBoui()
Retrieves the BOUI of the instance

Returns:

getDateCreate

java.util.Date getDateCreate()
Retrieve the date of creation for this object


getDateLastUpdate

java.util.Date getDateLastUpdate()
Retrieve the date of the last update to this instance


hasParent

boolean hasParent()
Checks whether this object has a parent object

Returns:
True if the object has a parent and false otherwise

getParent

BaseModel getParent()
Returns the parent object for this instance

Returns:
The parent of this instance

isSame

boolean isSame(BaseModel o)
Whether the instance is the same as the passed one

Parameters:
o - The instance to compare
Returns:
True if the instances are the same

isValid

boolean isValid()
Whether the instance is valid or not

Returns:
True if the instance is valid and false otherwise