Interface IDataRow


  • public interface IDataRow
    A DataRow represents a row in a DataTable.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getColumnIndex​(java.lang.String columnName)
      Returns the internal index for a column This method is only provided for performance reasons.
      IDataTable getDataTable()  
      IDataTableSchema getSchema()
      Returns the schema of the table of this row.
      <T> T getValue​(IContext context, int columnIndex)
      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 getValue​(IContext context, java.lang.String columnName)
      Returns the value of the column with the specified name in this row.
      boolean hasColumn​(java.lang.String columnName)
      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 Detail

      • getValue

        <T> T getValue​(IContext context,
                       java.lang.String columnName)
        Returns the value of the column with the specified name in this row.
        Parameters:
        context - the context.
        columnName - name of the column from which the value must be returned.
        Returns:
        the value of the specified column in this row.
        Throws:
        java.lang.IllegalArgumentException - when the columnName does not exist in this Row.
      • getValue

        <T> T getValue​(IContext context,
                       int columnIndex)
        Returns the value of the column with the specified index in this row.
        Parameters:
        context - the context.
        columnIndex - index of the column from which the value must be returned.
        Returns:
        the value of the specified column in this row.
        Throws:
        java.lang.IndexOutOfBoundsException - when the index exceeds the count of columns of this row.
      • getValue

        <T> T getValue​(IContext context,
                       IDataColumnSchema dataColumnSchema)
        Returns the value of the column with the index of the specified schema in this row. This method is identical in function to getValue(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.

        Parameters:
        context - the context
        dataColumnSchema - schema of the column from which the value must be returned
        Returns:
        the value of the specified column in this row
      • hasColumn

        boolean hasColumn​(java.lang.String columnName)
        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

        int getColumnIndex​(java.lang.String columnName)
        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