Release 10.1A: OpenEdge Development:
Java Open Clients

> ## Extended methods

> OpenEdge provides the following methods to extend the Java SDO `DataObject` and implement the `ProDataObject` class.

> ##### getFieldCount( )

> Returns the number of column properties that this `ProDataObject` represents:

> Syntax
>     int getFieldCount()

> A `ProDataObject` holds its data as a property list—one property per column. However, a `ProDataObject` might contain extra properties (reference properties) if it is involved in a data-relation (`ProDataRelatonMetaData`). This method returns the number of properties that map to a column. You can access these properties in sequence using the various `ProDataObject` set and get methods with the 0-based `propertyIndex` value up to the limit specified by this method.

> ##### getGregorianCalendar( )

> Returns the value of a `GregorianCalendar` column property, as specified by the overloaded methods:

> Note: The Java SDO API does not currently support `GregorianCalendar` for a `DataObject`. However, OpenEdge supports this data type for use with the `ProDataObject` class.

> Syntax
>     java.util.GregorianCalendar getGregorianCalendar(int propertyIndex)
>     java.util.GregorianCalendar getGregorianCalendar(String propertyName)

> ``propertyIndex``

> Specifies a 0-based index into the list of column properties contained by the `ProDataObject`. You can identify the index of a particular column property that corresponds to a mapped temp-table field using `ProDataObjectMetaData` methods. For more information, see the "ProDataObjectMetaData class" section.

> ``propertyName``

> Specifies the name of a column property in the `Property` list contained by the `ProDataObject`. This name is typically identical to the name of a Progress 4GL temp-table field to which this column property is mapped.

> ##### getTableName( )

> Returns the Progress 4GL name of the temp-table that this `ProDataObject` maps to:

> Syntax
>     java.lang.String getTableName()

> ##### getChildRows( )

> Returns a list of the specified child `ProDataObject` instances of the current parent `ProDataObject`:

> Syntax
>     java.util.List getChildRows(java.lang.String relationName)

> ``relationName``

> Specifies the name of a data-relation (`ProDataRelationMetaData`) in which the current `ProDataObject` participates as a parent row. For more information, see the "ProDataRelationMetaData class" section.

> ##### getParentRow( )

> Returns the parent `ProDataObject` of the current child `ProDataObject`:

> Syntax
>     ProDataObject getParentRow(java.lang.String relationName)

> ``relationName``

> Specifies the name of a data-relation (`ProDataRelationMetaData`) in which the current `ProDataObject` participates as a child row. For more information, see the "ProDataRelationMetaData class" section

> ##### getRowErrorString( )

> Returns the error string for this `ProDataObject` instance (row):

> Syntax
>     String getRowErrorString()

> This error string is set on return from the AppServer when the update to a data source using this row (mapped to a record in a temp-table) is not successful.

> ##### getTableErrorString( )

> Returns the error string for the temp-table (`ProDataObject` collection) that contains the data from this `ProDataObject`:

> Syntax
>     String getTableErrorString()

> This error string is set on return from the AppServer when the update to a data source using this temp-table is not successful.

> ##### hasRowError( )

> Returns `true` if the AppServer returned an error message for the temp-table record (row) mapped to this `ProDataObject`:

> Syntax
>     boolean hasRowError()

> It is set on return from the AppServer when an update to a data source using this row is not successful.

> ##### hasTableError( )

> Returns `true` if the AppServer returned an error message for the temp-table that contains the data from this `ProDataObject` row:

> Syntax
>     boolean hasTableError()

> It is set on return from the AppServer when an update to a data source using any row in this temp-table is not successful.

> ##### setGregorianCalendar( )

> Sets the value of a `GregorianCalendar` column property, as specified by the overloaded methods:

> Syntax
>     void setGregorianCalendar (int propertyIndex,
>                                java.util.GregorianCalendar value)
>     void setGregorianCalendar (String propertyName, java.util.GregorianCalendar
>     value)

> ``propertyIndex``

> Specifies a 0-based index into the list of column properties contained by the `ProDataObject`. You can identify the index of a particular column property that corresponds to a mapped temp-table field using `ProDataObjectMetaData` methods. For more information, see the "ProDataObjectMetaData class" section.

> ``propertyName``

> Specifies the name of a column property in the `Property` list contained by the `ProDataObject`. This name is typically identical to the name of a Progress 4GL temp-table field to which this column property is mapped.

> ``value``

> Specifies the value to set for this property.

> Note: The Java SDO API does not currently support `GregorianCalendar` for a `DataObject`. However, OpenEdge supports this data type for use with the `ProDataObject` class.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095