Kanzi 4.1.0
DataObjectProxy Class Reference

DataObject is the base class for data. More...

Inheritance diagram for DataObjectProxy:
[legend]

Public Member Functions

void addChild (DataObject child)
 Adds data object as child of this object.
 
DataObject findChild (String name)
 Tries to find a child with given name.
 
DataObject getChild (int index)
 Retrieves a child object in given index.
 
int getChildCount ()
 Retrieves the count of child objects in this data object.
 
int getChildIndex (DataObject child)
 Retrieves the index of a child data object.
 
String getName ()
 Allows to retrieve the name of the object.
 
DataObject getParent ()
 Retrieves the parent DataObject of this DataKanziObject.
 
DataObjectType getType ()
 Allows to retrieve the type of the object.
 
boolean hasChild (DataObject child)
 Checks whether or not the child exists.
 
void insertChild (int index, DataObject child)
 Inserts data object as child of this object, allows to specify index of the object.
 
void removeAllChildren ()
 Removes all children.
 
void removeChild (DataObject child)
 Removes a child object from the list of children.
 
void removeChild (int index)
 Removes a child object in given index.
 
void setName (String value)
 Sets the name of the object.
 
void setParent (DataObject parent)
 Assigns a parent DataObject to this DataKanziObject.
 
- Public Member Functions inherited from DataContext
ModifiedSubscriptionToken addModifiedNotificationHandler (ModifiedSubscriptionFunction modifiedHandlerFunction)
 Allows to subscribe to modifications in this data context.
 
void removeModifiedNotificationHandler (DataContext.ModifiedSubscriptionToken token)
 Removes a modification subscription.
 
- Public Member Functions inherited from DataContextProxy
DataObject getData ()
 Retrieves the root object of the underlying data tree.
 
DataContext lookupDataContext (String relativePath)
 Performs object look-up by path.
 
void notifyModified ()
 Triggers modification procedure in this data context, which invokes the subscriptions.
 
- Public Member Functions inherited from ResourceProxy
String getUrl ()
 Gets the resource URL.
 
void setKeepAlive (boolean keepAlive)
 Sets the keep alive flag.
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to.
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object.
 
long getNative ()
 Gets a pointer to the backing C++ instance.
 
TDataType getOptionalProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type, but does not use the default value if there are no inputs to the property value.
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type.
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value.
 
boolean isStale ()
 Test if the object is stale i.e.
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property.
 
void setFlagKeepDuringPatching (PropertyType< TDataType > propertyType)
 Sets the flag to indicate that the property was loaded from KZB.
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type.
 
ObjectRef< TTypetryCreateObjectRef (Class< TType > clazz)
 Tries to create an owning ObjectRef instance to this KanziObject.
 

Static Public Attributes

static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from DataContext
static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from DataContextProxy
static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from Resource
static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from ResourceProxy
static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from KanziObject
static final Metaclass metaclass = new AbstractMetaclass("Kanzi.Object")
 The Metaclass for the class.
 

Additional Inherited Members

- Public Attributes inherited from ResourceMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Resource")
 Metaclass for Resource.
 
- Public Attributes inherited from DataContextMetadata
DynamicPropertyType< ResourceDataContextProperty
 Source of data for this node and its descendants.
 
DynamicPropertyType< ResourceItemsSourceProperty
 Data object which provides data sources for list items.
 
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.DataContext")
 Metaclass for DataContext.
 
- Public Attributes inherited from DataObjectMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.DataObject")
 Metaclass for DataObject.
 

Detailed Description

DataObject is the base class for data.

All data within the data source is described as a tree of data objects. The base class provides support for the hierarchy as the derived classes provide support for different value types.

Member Function Documentation

◆ addChild()

void addChild ( DataObject child)

Adds data object as child of this object.

Parameters
childChild object to add.

◆ findChild()

DataObject findChild ( String name)

Tries to find a child with given name.

Returns
Child object that was found, or empty handle if there is no such child.

◆ getChild()

DataObject getChild ( int index)

Retrieves a child object in given index.

Returns
Child data object in given index.

◆ getChildCount()

int getChildCount ( )

Retrieves the count of child objects in this data object.

Returns
Child object count.

◆ getChildIndex()

int getChildIndex ( DataObject child)

Retrieves the index of a child data object.

Returns
Index of the item in question, throws exception if there is no such child.

◆ getName()

String getName ( )

Allows to retrieve the name of the object.

Returns
Returns the name of the object.

Reimplemented from ResourceProxy.

◆ getParent()

DataObject getParent ( )

Retrieves the parent DataObject of this DataKanziObject.

Returns
The parent DataObject of this DataKanziObject.

◆ getType()

DataObjectType getType ( )

Allows to retrieve the type of the object.

Returns
Type enumeration of the object.

◆ hasChild()

boolean hasChild ( DataObject child)

Checks whether or not the child exists.

Returns
true if there is such child, otherwise false.

◆ insertChild()

void insertChild ( int index,
DataObject child )

Inserts data object as child of this object, allows to specify index of the object.

Parameters
indexIndex where to add given object.
childChild object to add.

◆ removeChild() [1/2]

void removeChild ( DataObject child)

Removes a child object from the list of children.

Parameters
childChild object to remove.

◆ removeChild() [2/2]

void removeChild ( int index)

Removes a child object in given index.

Parameters
indexIndex of the child object to remove.

◆ setName()

void setName ( String value)

Sets the name of the object.

Parameters
valueNew name that is assigned to object.

◆ setParent()

void setParent ( DataObject parent)

Assigns a parent DataObject to this DataKanziObject.

Parameters
parentThe DataObject to set as the parent DataKanziObject.

Member Data Documentation

◆ metaclass

final Metaclass metaclass
static
Initial value:
=
com.rightware.kanzi.metadata.DataObjectMetadata.metaclass

The Metaclass for the class.