Class dataweb.datastore.View provides methods for accessing a view and also allows to filter and sort data obtained.
Methods are:

getValue(<Row>,<ColName>)
Return the value of the column <ColName>     and row <Row>.

getValue(<Row>,<IdxCol>)

Return the value of the column with index <IdxCol> and row <Row>.

getValues(<Row>)
Returns an array of values representing columns and row <Row>.

getData(<startRow>, <size>)
Returns an array of data by setting the start line <startRow> and the number of rows to return <size>.

getUID(<TableName>, <Row>)
Restituisce l'identificativo univoco della Tabella <TableName> for the row <Row>.

getRowCount()
Returns the number of rows

applyFilter (<Condition>)

Defines a condition to filter the view. Parameter <Condition> is an expression that returns a Boolean value.

applyFilter (<Condition>, <Order>)

Defines a condition to filter the view. Parameter <Condition> is an expression that returns a Boolean value. Columns are sorted by param <Order>.

applyFilter (<FilterName>, <parameters>)
Apply to view the preset filter <FilterName> with the values of the parameters <parameters>.

getTotalsCount ()
Returns the number of totals defined in the view.

getTotals (<Name>)
Returns total with name <Name>.
In order to instantiate View class we need the object dbSession that allows us to open a view by the method OpenView. This method can be used with different parameters:

dbSession.openView (<ViewName>)
dbSession.openView (<ViewBuilder>)

with the first definition we can recall a previously saved view, while the second recalls a view built at runtime.

Last updatedMonday, 29 November 2010 00:24