--
PedroRio - 30 Dec 2010
XEO Java API - boObject
The boObject class represents a instance of an Object Model, and has several methods to retrieve class handlers to manipulate attribute values, to retrieve class handlers to query the Object Model definition as well as methods to handle the instance's life cycle and behavior.
Object Properties
Methods in this category allow to retrieve properties of the object instance.
_
Dealing with Attributes
Methods in this category allow to retrieve handlers to interact with attributes of the instance.
Method Name |
Description |
Parameters |
Return type |
Notes |
getBridge |
Retrieves a bridgeHandler for a collection attribute given a name passed as parameter |
String name |
bridgeHandler |
|
getAllAttributes |
Retrieves a handler to all (collection and non-collection) attributes |
- |
boAttributeArray |
|
getAttributes |
Retrieves an array of attributeHandlers with all non-collection attributes |
- |
boAttributeArray |
The boAttributeArray class is a wrapper around an array to keep attribute handlers |
getAttributes |
Retrieves an array of attributes with all attributes of the type passed as a parameter |
byte type |
boAttributeArray |
* See table of convertions ( VAI VER boDefAttribute.java public static final byte VALUE_UNKNOWN=0; public static final byte VALUE_CHAR=9; public static final byte VALUE_BOOLEAN=1; public static final byte VALUE_DURATION=2; public static final byte VALUE_CURRENCY=3; public static final byte VALUE_NUMBER=4; public static final byte VALUE_DATETIME=5; |
getBridges |
Retrieves an array of bridgeHandlers with all collection attributes of the instances |
- |
boAttributeArray |
|
getAllAttributes |
Retrieves an array will all attributes (collection and non-collection |
- |
boAttributeArray |
|
getAttribute |
Retrieves an attributeHandler for the attribute passed as a parameter |
String name |
AttributeHandler |
|
__
Dealing with Definitions
These methods allow to interact with the XEO Model definition of the given instance.
Method Name |
Description |
Parameters |
Return Type |
Notes |
getBoDefinition |
Returns a wrapper around the Object Model definition, so that the definition can be |
- |
boDefHandler |
|
getMenuMethods |
Returns an array with the definition of all methods defined in the current object model |
- |
boDefMethod[] |
|
getToolBarMethods |
Same as above |
- |
boDefMethod[] |
|
getToolbarMethodNames |
Retrieves |
- |
String[] |
|
______
Object Life Cycle
Method Name |
Description |
Parameters |
Return type |
Notes |
update |
Saves any changes to the object instance persintently - |
- |
void |
If there are any objects in this instance's update queue, their update method will also be called |
destroy |
Deletes the current instance (if there are references to this object it will throw an exception) |
- |
void |
|
destroyForce |
Forces the deletion of the current instance (even if there're references to it) |
- |
void |
|
getUpdateQueue |
Retrieves the update queue of the current instance. The update queue |
- |
boObjectUpdateQueue |
|
exists |
Checks if the instance is saved in the database or only exists in memory |
- |
boolean |
Returns true if object is saved in the database and false otherwise |
clone |
Creates a copy of the current instance |
- |
boObject |
Does not duplicate iFile attributes, rather it makes a reference to the iFile of the original boObject instance. |
isChanged |
Checks if the object was changed since it was loaded |
- |
boolean |
|
setDisabled |
Disables the object (an eventually all of its children) |
boolean deep |
void |
If the deep parameter is true it will disable all objects related to this instance. |
isDisabled |
Checks whether this is instance is disabled or not |
- |
boolean |
|
___
Object Behavior
aaaaaa
Method Name |
Description |
Parameters |
Return type |
Notes |
addErrorMessage |
Adds an error message to the instance |
String message |
void |
|
addErrorMessage |
Adds an error message associated to a given attribute |
AttributeHandler, String name |
void |
|
addAdvertiseMessage |
Not implemented in viewers |
|
|
|
addAdvertiseMessage |
For attribute - Not implemented |
|
|
|
haveErrors |
|
|
|
|
haveErrors()
haveObjectErrors()
haveAttributeErrors()
getObjectErrors
getAttributeErrors
clearErrors()
clearObjectErrors()
clearAttributeErrors()
valid() - If the object is valid
References
getParent()
getParents()
removeParent()
addParent()
getReferencesObjects()
getReferencedByObjects()
a
VERIFICAR: mergeAttributes
a