Collaboration API Documentation

com.filenet.bso.api.util
Class BsoSearchResultRow

java.lang.Object
  |
  +--com.filenet.bso.api.util.BsoSearchResultRow

public class BsoSearchResultRow
extends java.lang.Object

An instance of this class represents a row of some search results. This can be an actual row from the results or a virtual row representing only the columns for a particular class.


Constructor Summary
BsoSearchResultRow(BsoSearchResultsClassData thisClassData, BsoSearchResultsClassData[] referencedClassDatas)
          Constructor that takes directly a BsoSearchResultsClassData object that represents the class for this row and an array of BsoSearchResultsClassData objects that represent any classes for rows this row may reference.
BsoSearchResultRow(java.lang.String classIdent, BsoSearchResultsClassData[] classDatas)
          Construct an instance of the BsoSearchResultRow class.
 
Method Summary
 void addReferencedClassRow(BsoSearchResultRow refedRow)
          Adds a row for a referenced class to this row.
 boolean canReferenceClass(java.lang.String classIdent)
          Method to determine if it is possible for this row to even reference rows from another class.
 BsoSearchResultsClassData getClassData()
          Returns the class data for the class associated with this row.
 int getColumnCount()
          Returns the number of columns in this row.
 java.lang.String getColumnName(int columnIdx)
          Returns the column name for a particular column number.
 java.lang.String getColumnType(int columnIdx)
          Returns the column type for a particular column number.
 java.lang.String getColumnType(java.lang.String columnName)
          Returns the column type for a particular column name.
 java.lang.String getColumnValue(int columnIdx)
          Returns the column value for a particular column number.
 java.lang.String getColumnValue(java.lang.String columnName)
          Returns the column value for a particular column name.
 BsoSearchResultRow getReferencedClassRow(java.lang.String classIdent)
          Gets the single row for a class referenced from this class.
 BsoSearchResultRow getReferencedClassRow(java.lang.String classIdent, int idx)
          Gets a row from a class referenced from this row.
 BsoSearchResultRow getReferencedClassRow(java.lang.String classIdent, java.lang.String ident)
          Gets a row from a class referenced from this class.
 int getReferencedClassRowCount(java.lang.String classIdent)
          Gets the number of rows referenced by this row for another class.
static BsoSearchResultRow getRowCanReferenceClass(BsoSearchResultRow[] rows, java.lang.String classKey)
           
static BsoSearchResultRow getRowCanReferenceClassFromRowOrRows(java.lang.Object rowOrRows, java.lang.String classKey)
           
static BsoSearchResultRow getRowHasColumn(BsoSearchResultRow[] rows, java.lang.String propName)
           
static BsoSearchResultRow getRowHasColumnFromRowOrRows(java.lang.Object rowOrRows, java.lang.String propName)
           
static BsoSearchResultRow getRowWithClassIdentifiedByKey(BsoSearchResultRow[] rows, java.lang.String classKey)
           
static BsoSearchResultRow getRowWithClassIdentifiedByKeyFromRowOrRows(java.lang.Object rowOrRows, java.lang.String classKey)
           
 boolean hasColumn(java.lang.String columnName)
          Determines if a row has a column of a particular name.
 boolean hasReferencedClassRow(java.lang.String classIdent, java.lang.String ident)
          Determines if this row references a particular row for another class.
 void setColumn(java.lang.String columnName, java.lang.String columnType, java.lang.String columnValue)
          Sets a column on the row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BsoSearchResultRow

public BsoSearchResultRow(java.lang.String classIdent,
                          BsoSearchResultsClassData[] classDatas)
Construct an instance of the BsoSearchResultRow class.
Parameters:
classIdent - Optional, a class identifier if multiple classes are involved in the query. The identifier can be the class prefix or one of the keys specified for the class. If null, the empty prefix is assumed.
classDatas - Optional, class data objects. This array must include at least class data for the above class identifier as well as data for any classes that this class references. It doesn't hurt to pass in more objects than are required for this class. If null, a class data structure with an empty prefix is assumed.

BsoSearchResultRow

public BsoSearchResultRow(BsoSearchResultsClassData thisClassData,
                          BsoSearchResultsClassData[] referencedClassDatas)
Constructor that takes directly a BsoSearchResultsClassData object that represents the class for this row and an array of BsoSearchResultsClassData objects that represent any classes for rows this row may reference. The variation of the constructor BsoSearchResultRow(String, BsoSearchResultsClassData[]) internally internally breaks out the objects into these two variables. This constructor is important when merging multiple rows together into a single row, and references to other rows. In particular, the keys used to identify the class for this row may overlap with keys used to identify classes for referenced rows. It is possible for a particular object to show up as both the primary class being searched and as an object referenced from another object.
Parameters:
thisClassData -  
referencedClassDatas -  
Method Detail

getRowCanReferenceClass

public static BsoSearchResultRow getRowCanReferenceClass(BsoSearchResultRow[] rows,
                                                         java.lang.String classKey)

getRowCanReferenceClassFromRowOrRows

public static BsoSearchResultRow getRowCanReferenceClassFromRowOrRows(java.lang.Object rowOrRows,
                                                                      java.lang.String classKey)

getRowHasColumn

public static BsoSearchResultRow getRowHasColumn(BsoSearchResultRow[] rows,
                                                 java.lang.String propName)

getRowHasColumnFromRowOrRows

public static BsoSearchResultRow getRowHasColumnFromRowOrRows(java.lang.Object rowOrRows,
                                                              java.lang.String propName)

getRowWithClassIdentifiedByKey

public static BsoSearchResultRow getRowWithClassIdentifiedByKey(BsoSearchResultRow[] rows,
                                                                java.lang.String classKey)

getRowWithClassIdentifiedByKeyFromRowOrRows

public static BsoSearchResultRow getRowWithClassIdentifiedByKeyFromRowOrRows(java.lang.Object rowOrRows,
                                                                             java.lang.String classKey)

getClassData

public BsoSearchResultsClassData getClassData()
Returns the class data for the class associated with this row.

setColumn

public void setColumn(java.lang.String columnName,
                      java.lang.String columnType,
                      java.lang.String columnValue)
Sets a column on the row. Adds it to the row if the name was not set previously. This is typically only called by the XML Reader class that parses the search results XML and builds the row objects. The column value can be null. This can be used to for example pre-set all columns to null, then set them to actual values for the columns that have values.

getColumnCount

public int getColumnCount()
Returns the number of columns in this row.

hasColumn

public boolean hasColumn(java.lang.String columnName)
Determines if a row has a column of a particular name. A row can have a column even if the value for that column is null.

getColumnValue

public java.lang.String getColumnValue(java.lang.String columnName)
Returns the column value for a particular column name. A runtime exception will be thrown if the column does not exist. The column value can be null.

getColumnType

public java.lang.String getColumnType(java.lang.String columnName)
Returns the column type for a particular column name. This is the type as indicated in the search results XML (e.g. uuid, string), not an integer type as for a property on a Content Engine object.

getColumnName

public java.lang.String getColumnName(int columnIdx)
Returns the column name for a particular column number.

getColumnValue

public java.lang.String getColumnValue(int columnIdx)
Returns the column value for a particular column number. The column value can be null.

getColumnType

public java.lang.String getColumnType(int columnIdx)
Returns the column type for a particular column number.

addReferencedClassRow

public void addReferencedClassRow(BsoSearchResultRow refedRow)
Adds a row for a referenced class to this row. This is typically called by the XML Reader object that parses the search results XML and builds the row objects. You cannot add the same row, identified by the identity column for that class, more than once.

canReferenceClass

public boolean canReferenceClass(java.lang.String classIdent)
Method to determine if it is possible for this row to even reference rows from another class. There may or may not be actual rows for that other class.
Parameters:
classIdent -  
Returns:
 

hasReferencedClassRow

public boolean hasReferencedClassRow(java.lang.String classIdent,
                                     java.lang.String ident)
Determines if this row references a particular row for another class.
Parameters:
classIdent - Class identifier that represents the referenced class. Can be either the class prefix or one of the keys specified for the class.
ident - The value of the identity column for the row of the other class.

getReferencedClassRowCount

public int getReferencedClassRowCount(java.lang.String classIdent)
Gets the number of rows referenced by this row for another class.
Parameters:
classIdent - Class identifier that represents the referenced class. Can be either the class prefix or one of the keys specified for the class.
Returns:
Number of rows referenced.

getReferencedClassRow

public BsoSearchResultRow getReferencedClassRow(java.lang.String classIdent,
                                                int idx)
Gets a row from a class referenced from this row.
Parameters:
classIdent - Class identifier that represents the referenced class. Can be either the class prefix or one of the keys specified for the class.
idx - Index of the row to return.
Returns:
The referenced class row.

getReferencedClassRow

public BsoSearchResultRow getReferencedClassRow(java.lang.String classIdent,
                                                java.lang.String ident)
Gets a row from a class referenced from this class. The other row is referenced by the value of its identity column.
Parameters:
classIdent - Class identifier that represents the referenced class. Can be either the class prefix or one of the keys specified for the class.
ident - Value of the identity column of the row to fetch.
Returns:
The row of the referenced to class.

getReferencedClassRow

public BsoSearchResultRow getReferencedClassRow(java.lang.String classIdent)
Gets the single row for a class referenced from this class. This method only works when there is a single row for the referenced class. Otherwise an exception is thrown.

Collaboration API Documentation

Copyright ?2002 - 2005 FileNet Corporation. All rights reserved.