Skip navigation links


COM.FutureTense.Interfaces
Interface IList

All Known Implementing Classes:
COM.FutureTense.Util.IListWrapper, IterableIListWrapper

public interface IList

This interface defines the IList object that is used throughout Content Server for database queries and other representations of tabular data.

Individuals may choose to implement this for custom application purposes. Also, in order to create a custom list object that is accessible through the ICS object or the XML scripting language, you have to implement this interface.


Field Summary
static int first
          Command indicating that IList.moveToRow(int, int) should move to the first row.
static int gotorow
          Command indicating that IList.moveToRow(int, int) should move to the specified row.
static int last
          Command indicating that IList.moveToRow(int, int) should move to the last row.
static int next
          Command indicating that IList.moveToRow(int, int) should move to the next row.
static int prev
          Command indicating that IList.moveToRow(int, int) should move to the previous row.

 

Method Summary
 boolean atEnd()
          Return whether this list is at the last row (at the end) of the rows of data.
 IList clone(java.lang.String newname)
          Normally used internally by CS server to shallow copy a list object; return null from a user defined list object if support isn't implemented or desired.
 int currentRow()
          Returns the number of the current row of this list.
 void flush()
          Flushes a list object, clearing the resultset from the cache and notifies the rest of the cluster member (if any).
 java.lang.String getColumnName(int i)
          Retrieves the name of the column at an offset, counting from 0 (zero).
 byte[] getFileData(java.lang.String columname)
          Returns the data contained in a referenced data file.
 java.lang.String getFileString(java.lang.String columname)
          Returns the string data contained in a referenced data file.
 java.lang.String getIndirectColumnName(int index)
          Supply the upload column by index; this is normally only used by internal IPS generates list objects for url columns ie upload datasource columns.
 java.lang.String getName()
          Retrieves the name of this list.
 java.lang.Object getObject(java.lang.String colname)
          Get an object from the specified column for the current row.
 java.lang.String getValue(java.lang.String columname)
          Retrieves the value of a named column for the current row.
 boolean hasData()
          Checks if the list contains any data.
 boolean moveTo(int i)
          Moves the list to a given row number.
 boolean moveToRow(int how, int v)
          Move to a new row given a specific command
 int numColumns()
          Retrieves the number of columns in the list, excluding indirect columns.
 int numIndirectColumns()
          Return a count of columns which are meant to be indirect data pointers; normally only used by internal CS ilist objects so the default implementation for a user-defined ilist should return 0
 int numRows()
          Returns the number of rows in a list.
 void rename(java.lang.String newname)
          Allow the renaming of a list
 boolean stringInList(java.lang.String item)
          Internal CS function; 1 column lists may choose to implement whether a given value is in any row.

 

Field Detail

next

static final int next
Command indicating that IList.moveToRow(int, int) should move to the next row.
See Also:
Constant Field Values

prev

static final int prev
Command indicating that IList.moveToRow(int, int) should move to the previous row.
See Also:
Constant Field Values

first

static final int first
Command indicating that IList.moveToRow(int, int) should move to the first row.
See Also:
Constant Field Values

last

static final int last
Command indicating that IList.moveToRow(int, int) should move to the last row.
See Also:
Constant Field Values

gotorow

static final int gotorow
Command indicating that IList.moveToRow(int, int) should move to the specified row.
See Also:
Constant Field Values

Method Detail

getName

java.lang.String getName()
Retrieves the name of this list. The name corresponds to the name the list is registered with in the ContentServer context.
Returns:
Returns the name of the list.

hasData

boolean hasData()
Checks if the list contains any data.
Returns:
Returns true if the list contains data, false if it is empty.

numColumns

int numColumns()
Retrieves the number of columns in the list, excluding indirect columns.
Returns:
Returns the number of columns.

currentRow

int currentRow()
Returns the number of the current row of this list.

Rows begin numbering from one.

Returns:
Returns the current row number or -1 if there is no current row. This can be caused by an internal error or empty list.

getValue

java.lang.String getValue(java.lang.String columname)
                          throws java.lang.NoSuchFieldException
Retrieves the value of a named column for the current row.
Parameters:
columname - The name of the column to get the results for.
Returns:
Returns the value of the column. May be null or empty, depending on the data type.
Throws:
java.lang.NoSuchFieldException

getObject

java.lang.Object getObject(java.lang.String colname)
                           throws java.lang.NoSuchFieldException
Get an object from the specified column for the current row.

The type of data stored in the list is implementation-specific. For example, if the list represents a database query, the object returned will be null unless the column represents a byte array. Other lists may return particular types

Throws:
java.lang.NoSuchFieldException

getFileData

byte[] getFileData(java.lang.String columname)
                   throws java.lang.IllegalArgumentException,
                          java.lang.NoSuchFieldException
Returns the data contained in a referenced data file. This call reads data from the associated file upon each invocation.
Parameters:
columname - The name of the column.
Returns:
Returns the byte[] value, which can be "null".
Throws:
java.lang.IllegalArgumentException - if the column is not an indirect column
java.lang.NoSuchFieldException - if the field is invalid

getFileString

java.lang.String getFileString(java.lang.String columname)
                               throws java.lang.NoSuchFieldException
Returns the string data contained in a referenced data file.
Parameters:
columname - The name of the column.
Returns:
Returns the string value, which can be "null".
Throws:
java.lang.NoSuchFieldException - if the column is not an indirect data type

flush

void flush()
Flushes a list object, clearing the resultset from the cache and notifies the rest of the cluster member (if any).

getColumnName

java.lang.String getColumnName(int i)
                               throws java.lang.ArrayIndexOutOfBoundsException
Retrieves the name of the column at an offset, counting from 0 (zero).
Parameters:
i - The offset column number.
Returns:
Returns the column name.
Throws:
java.lang.ArrayIndexOutOfBoundsException

numRows

int numRows()
Returns the number of rows in a list.

USE WITH CARE. If the list represents uncached data in a database, a large delay and high memory useage might be encountered as the list must be scanned ON THE DATABASE SIDE to determine the count.

Returns:
Returns the number of rows in the list.

moveTo

boolean moveTo(int i)
Moves the list to a given row number.
Parameters:
i - The row number, numbered from one.
Returns:
Returns true on success, false on failure.

atEnd

boolean atEnd()
Return whether this list is at the last row (at the end) of the rows of data.
Returns:
boolean true if already navigated to first or last row

moveToRow

boolean moveToRow(int how,
                  int v)
Move to a new row given a specific command
Parameters:
how - command
v - value of the new row if how is IList.gotorow
Returns:
boolean if navigation succeeded

numIndirectColumns

int numIndirectColumns()
Return a count of columns which are meant to be indirect data pointers; normally only used by internal CS ilist objects so the default implementation for a user-defined ilist should return 0

getIndirectColumnName

java.lang.String getIndirectColumnName(int index)
Supply the upload column by index; this is normally only used by internal IPS generates list objects for url columns ie upload datasource columns. Normally a user defined ilist should return null;

clone

IList clone(java.lang.String newname)
Normally used internally by CS server to shallow copy a list object; return null from a user defined list object if support isn't implemented or desired.

A user-defined implementation may decide to provide a deep copy.


rename

void rename(java.lang.String newname)
Allow the renaming of a list
See Also:
IList.getName()

stringInList

boolean stringInList(java.lang.String item)
Internal CS function; 1 column lists may choose to implement whether a given value is in any row. Only works on StringList and FileList IPS (not DB queries) objects or enhanced 3rd party IList objects.

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.