Interface IDataRow
public interface IDataRow
A
DataRow
represents a row in a DataTable
.-
Method Summary
Modifier and TypeMethodDescriptionint
getColumnIndex
(String columnName) Returns the internal index for a column This method is only provided for performance reasons.Returns the data table to which this row belongs.Returns the schema of the table of this row.<T> T
Returns the value of the column with the specified index in this row.<T> T
getValue
(IContext context, IDataColumnSchema dataColumnSchema) Returns the value of the column with the index of the specified schema in this row.<T> T
Returns the value of the column with the specified name in this row.boolean
Returns whether the column name is defined in the schema or not.boolean
hasReadAccess
(int columnIndex) Returns whether the user which has retrieved the data, has read access to the given column.boolean
hasWriteAccess
(int columnIndex) Returns whether the user which has retrieved the data, has write access to the given column.
-
Method Details
-
getValue
Returns the value of the column with the specified name in this row.- Type Parameters:
T
- the type of the result value- Parameters:
context
- the contextcolumnName
- name of the column from which the value must be returned- Returns:
- the value of the specified column in this row
- Throws:
IllegalArgumentException
- when the columnName does not exist in this Row
-
getValue
Returns the value of the column with the specified index in this row.- Type Parameters:
T
- the type of the result value- Parameters:
context
- the contextcolumnIndex
- index of the column from which the value must be returned- Returns:
- the value of the specified column in this row
- Throws:
IndexOutOfBoundsException
- when the index exceeds the count of columns of this row
-
getValue
Returns the value of the column with the index of the specified schema in this row. This method is identical in function togetValue(dataColumnSchema.getIndex())
.The returned value can be a primitive object or another
DataTable
object. When in the original request simply attributes of metaobjects were requested, the returned values will be of the primitive Java type corresponding to the type of the attribute. When aggregate functions are combined with simple attributes, this will also be the case. However, when more complex OQL expressions are used, it isn't always predictable which type the returned values will have. It depends on the expression type and the database type.- Type Parameters:
T
- the type of the result value- Parameters:
context
- the contextdataColumnSchema
- schema of the column from which the value must be returned- Returns:
- the value of the specified column in this row
-
hasColumn
Returns whether the column name is defined in the schema or not.- Parameters:
columnName
- the name of the column- Returns:
- true if and only if the column name is defined in the schema
-
getColumnIndex
Returns the internal index for a column This method is only provided for performance reasons. When looking up the value, as well as read and write permissions on a column, first use this function to determine the index value. After that, use calls which ask for the index instead of the column name.- Parameters:
columnName
- the name of the column- Returns:
- the internal index for a column
-
getSchema
IDataTableSchema getSchema()Returns the schema of the table of this row.- Returns:
- the schema of the table of this row
-
hasReadAccess
boolean hasReadAccess(int columnIndex) Returns whether the user which has retrieved the data, has read access to the given column.- Parameters:
columnIndex
- the column to retrieve the access information- Returns:
- whether the user which has retrieved the data, has read access to the given column
-
hasWriteAccess
boolean hasWriteAccess(int columnIndex) Returns whether the user which has retrieved the data, has write access to the given column.- Parameters:
columnIndex
- the column to retrieve the access information- Returns:
- whether the user which has retrieved the data, has write access to the given column
-
getDataTable
IDataTable getDataTable()Returns the data table to which this row belongs.- Returns:
- the data table of this row
-