Tags:
create new tag
, view all tags
-- PedroRio - 30 Dec 2010

XEO Java API - boObject

The boObject class represents a instance of a XEO Model and has several methods to retrieve handlers to manipulate attribute values, to retrieve handlers to query the XEO 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 instance.

Method Name Description Parameters Return type Notes
getBoui Retrieves the BOUI (Business Object Unique Identifier) - long  
getName Retrieve the name of the Object Model of this instance - String  
getCardID Retrieves the CardID of the boObject - StringBuffer  

_

Dealing with Attributes

Methods in this category allow you to retrieve handlers to interact with attributes of the instance.

Method Name Description Parameters Return type Notes
getAttribute Retrieves an attributeHandler for the attribute passed as a parameter String name AttributeHandler  
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 in class boDefAttribute.java (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; etc...)

getAllAttributes Retrieves a handler to all (collection and non-collection) attributes - boAttributeArray  
getBridge Retrieves a bridgeHandler for a collection attribute given a name passed as parameter String name bridgeHandler  
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  

__

Dealing with Definitions

These methods allow to retrieve information from 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 the name of the toolbar methods - String[]  

______

Object Life Cycle

Method Name Description Parameters Return type Notes
update Saves any changes to the 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

Methods in this group regard object behavior. With these methods you can check if the instance is valid or add error messages (which will be displayed in the instance's edit viewer) or check for existing error messages. Error messages can be generically added to the instance or to a specific attribute.

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 XXX    
addAdvertiseMessage For attribute - Not implemented XXX    
haveErrors Checks whether the instance has an error or not (object errors or attribute errors) - boolean  
haveObjectErrors Checks whether the instance has an error (object error only) - boolean  
haveAttributeErrors Checks whether the instance has any attribute error - boolean  
getObjectErrors Retrieves the list of errors associated to the instance (object errors) - ArrayList  
getAttributeErrors Retrieves the list of errors associated with attributes of the instance - Hashtable  
clearErrors Clear the instance of any error (object or attribute error) - void  
clearObjectErrors Clears the instance of any object error - void  
clearAttributeErrors Clears the instance of any attribute error - void  
valid Checks whether or not the instance is valid (has no errors) - boolean  

___

References

Methods in this category are provided to deal with references to and from this instance.

Method Name Description Parameters Return type Notes
getParent Retrieves the boObject instance which is the parent of this instance (or null if it does not have one) - boObject  
getParents Retrieves the list of boObject instance which are parents of this instance (only if Object Model allows multi-parent - boObject[]  
removeParent Removes a given instance from being the current instance's parent boObject parent, boolean orphanRelation void  
addParent Adds a new parent instance to the current instance (if the instance already has a parent, it's replaced by the new one, if the instance supports multi-parent, the new parent is added) boObject parent void  
getReferencesObjects Retrieves an array of objects which this instances makes a reference to - boObject[]  
getReferencedByObjects Retrieves an array of object which reference this instance - boObject[]  

_

Topic revision: r10 - 2011-04-04 - NicolauGrosskopf
 

No permission to view TWiki.WebTopBar

This site is powered by the TWiki collaboration platform Powered by Perl

No permission to view TWiki.WebBottomBar