com.flexive.shared.cmis.search
Class CmisResultRow

java.lang.Object
  extended by com.flexive.shared.cmis.search.CmisResultRow
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<CmisResultValue>

public class CmisResultRow
extends java.lang.Object
implements java.io.Serializable, java.lang.Iterable<CmisResultValue>

Disclaimer: this API is part of the CMIS interface and is not yet considered stable.

A row in a CmisResultSet. The column values are boxed in CmisResultValue objects.

You can iterate over the columns of this row using it as an iterator, or access the columns directly:

 final CmisResultRow row = ...;
 for (CmisResultValue column : row) {
     System.out.println(column.getValue());
 }
 System.out.println(row.getColumn(1));        // prints the contents of the first column
 System.out.println(row.getColumn("name"));   // access the column through its alias   
 

Since:
3.1
Version:
$Rev$
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
CmisResultRow(java.util.List<CmisResultColumnDefinition> columnDefinitions)
          Create a new result row.
 
Method Summary
(package private)  CmisResultRow freeze()
          Freeze the result row and prevent further modifications (i.e.
 CmisResultValue getColumn(int column)
           
 CmisResultValue getColumn(java.lang.String alias)
           
 java.util.List<CmisResultColumnDefinition> getColumnDefinitions()
           
(package private)  int getColumnIndex(java.lang.String alias)
           
 java.util.List<CmisResultValue> getColumns()
           
 int indexOf(java.lang.String alias)
           
 java.util.Iterator<CmisResultValue> iterator()
           
 CmisResultRow setValue(int column, java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmisResultRow

CmisResultRow(java.util.List<CmisResultColumnDefinition> columnDefinitions)
Create a new result row. To add a new row to a result set, create the row with CmisResultSet.newRow().

Parameters:
columnDefinitions - the column definitions (fixes column count)
Method Detail

setValue

public CmisResultRow setValue(int column,
                              java.lang.Object value)

getColumns

public java.util.List<CmisResultValue> getColumns()

getColumn

public CmisResultValue getColumn(int column)

getColumn

public CmisResultValue getColumn(java.lang.String alias)

iterator

public java.util.Iterator<CmisResultValue> iterator()
Specified by:
iterator in interface java.lang.Iterable<CmisResultValue>

getColumnDefinitions

public java.util.List<CmisResultColumnDefinition> getColumnDefinitions()

indexOf

public int indexOf(java.lang.String alias)

getColumnIndex

int getColumnIndex(java.lang.String alias)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

freeze

CmisResultRow freeze()
Freeze the result row and prevent further modifications (i.e. setting column values).

Returns:
this