Views
Data Access Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
IliTable Class Reference

Table class. More...

#include <ilviews/dataccess/table.h>

Inheritance diagram for IliTable:
IliSchema IliRefCounted IliMapTable IliMemoryTable IliStringsTable IliSQLTable

Public Member Functions

void addErrorSink (IliErrorSink *sink)
 Adds an error sink. More...
 
virtual IlBoolean allowRowMove () const
 Returns IlTrue if the table (or subclass of the table) allows row move operations. More...
 
IlInt appendParameter (const char *paramName, const IliDatatype *type, IlInt maxlen=-1)
 Appends a new parameter to the table parameters. More...
 
IlInt appendRow (IliTableBuffer *tblBuf)
 Appends a new row defined by the table buffer. More...
 
IlInt appendRowInCache (IliTableBuffer *tblBuf)
 Appends a new row defined by the table buffer. More...
 
virtual IlBoolean applyQueryMode (IliTable *queryTable)
 Applies the query specified by the conditions contained in the provided table. More...
 
IliValue at (IlInt rowno, IliName colname) const
 Returns a value. More...
 
IliValue at (IlInt rowno, IlInt colno) const
 Returns a value. More...
 
virtual IlBoolean checkConstraints (IlInt rowno, IliTableBuffer *buff) const
 Validates the table buffer data. More...
 
virtual void clearRows ()
 Deletes all rows. More...
 
IliTablecopyTable () const
 Returns a copy of the table. More...
 
void deleteParameter (IlInt paramno)
 Deletes a parameter. More...
 
virtual IlBoolean deleteRow (IlInt rowno)
 Deletes a row. More...
 
virtual IlBoolean deleteRowInCache (IlInt rowno)
 Deletes a row. More...
 
void enableColumnCompletion (IlInt colno, IlBoolean flag)
 Specifies whether completion is enabled for the column. More...
 
virtual IlBoolean exchangeRows (IlInt rowno1, IlInt rowno2)
 Exchanges two rows. More...
 
virtual IlBoolean exchangeRowsInCache (IlInt rowno1, IlInt rowno2)
 Exchanges two rows. More...
 
virtual IlInt fetchAll ()
 Fetches all remaining rows and stores them in the local row cache. More...
 
virtual IlBoolean fetchCompleted () const
 Returns IlTrue, if all the rows have been fetched from the database and stored in the local row cache. More...
 
virtual IlInt fetchNext (IlInt count=1)
 Fetches up a number of rows from the database and stores them in the local row cache. More...
 
IlInt findFirstRow (const IliValue &value, IlInt colno, IlBoolean complete, IlInt fromRow=0, IlInt toRow=-1) const
 Searches for a row located between two positions. More...
 
IlInt findRow (const IliValue &value, IlInt colno, IlBoolean complete, IlInt fromRow=0, IlInt toRow=-1) const
 Searches for a row located between two positions. More...
 
IliTableBuffergetBuffer ()
 Returns a table buffer for the table. More...
 
IlBoolean getColumnDisplayValue (IlInt colno, const IliValue &value, IliValue &displayValue, IlvGraphicHolder *h=0)
 Returns the display value for a value. More...
 
IliTablegetColumnEffectiveForeignTable (IlInt colno, IlvGraphicHolder *h=0) const
 Returns the effective foreign table. More...
 
const char * getColumnForeignDataSourceName (IlInt colno) const
 Returns the name of the data source that will provide a foreign table for one column. More...
 
const char * getColumnForeignDisplayColumn (IlInt colno) const
 Returns the name of the display column in the foreign table. More...
 
IliTablegetColumnForeignTable (IlInt colno) const
 Returns the foreign table of one column. More...
 
const char * getColumnForeignValueColumn (IlInt colno) const
 Returns the name of the value column in the foreign table. More...
 
IlAny getCompareData () const
 Returns the user data that can be used to compare two rows. More...
 
IliCompareFunction getCompareFunction () const
 Returns the function that is used to compare two rows. More...
 
IliTablePropertyManagergetDefaultPropertyManager ()
 Returns the default property manager. More...
 
const IliTablePropertyManagergetDefaultPropertyManager () const
 Returns the default property manager. More...
 
IlvGadgetHolder * getGadgetHolder () const
 Returns the gadget holder to which the table is attached. More...
 
IliTablePropertyManagergetNamedPropertyManager (const char *name) const
 Returns a property manager from its name. More...
 
IlInt getNamedPropertyManagerCount () const
 Returns the number of named property managers. More...
 
const char * getParameterColumnName (IlInt paramno) const
 Returns the name of the column, which the parameter is attached to. More...
 
const char * getParameterDataSourceName (IlInt paramno) const
 Returns the name of the data source which the parameter is attached to. More...
 
IliValue getParameterDataSourceValue (IlInt paramno) const
 Returns the current value of one parameter. More...
 
IlInt getParameterIndex (const char *name) const
 Returns the position of one parameter. More...
 
IlInt getParameterMaxLength (IlInt paramno) const
 Returns the maximum length allowed for one parameter. More...
 
const char * getParameterName (IlInt paramno) const
 Returns a parameter name. More...
 
IlInt getParametersCount () const
 Returns the number of parameters defined for this table. More...
 
const IliDatatypegetParameterType (IlInt paramno) const
 Returns the parameter type. More...
 
IliValue getParameterValue (IliName paramName) const
 Returns the current value of one parameter. More...
 
IliValue getParameterValue (IlInt paramno) const
 Returns the current value of one parameter. More...
 
IlBoolean getProperty (IlInt rowno, IlInt colno, const IlvSymbol *propName, IliValue &propVal) const
 Returns a property value attached to the part of the table. More...
 
IlInt getPropertyCount (IlInt rowno, IlInt colno) const
 Returns the property count attached to the part of the table. More...
 
const char * getPropertyManagerNameAt (IlInt idx) const
 Returns the name of the named property manager. More...
 
const IlvSymbolgetPropertyNameAt (IlInt rowno, IlInt colno, IlInt propIndex) const
 Returns a property name attached to the part of the table. More...
 
IliRowPtr getRowPtr (IlInt rowno=-1) const
 Returns an IliRowPtr that points to one row. More...
 
virtual IlInt getRowsCount () const
 Returns the number of rows in the table. More...
 
virtual IliRowStatus getRowStatus (IlInt rowno) const
 Returns the status of one row. More...
 
IliTransactionManagergetTransactionManager () const
 Returns the transaction manager managing the table. More...
 
const char * getTransactionManagerName () const
 Returns the name of the transaction manager that manages the table. More...
 
virtual IlBoolean getValue (IlInt rowno, IlInt colno, IliValue &value) const
 Returns a value. More...
 
virtual IlBoolean insertRow (IlInt rowno, IliTableBuffer *buff)
 Inserts a row that is defined by the table buffer. More...
 
virtual IlBoolean insertRowInCache (IlInt rowno, IliTableBuffer *buff)
 Inserts a row that is defined by the table buffer. More...
 
virtual IlBoolean insertRowsFrom (const IliTable *src, IlInt srcFromRow=0, IlInt srcToRow=-1, IlBoolean stopAtFirstError=IlTrue, IlInt insertAt=-1)
 Inserts rows into this table by copying them from another table. More...
 
IlBoolean isColumnCompletionEnabled (IlInt colno) const
 Returns IlTrue if completion is enabled for the column. More...
 
IlBoolean isColumnValueConstrained (IlInt colno) const
 Returns IlTrue if the column is constrained to taking its values from the domain of the value column of the foreign table. More...
 
IlBoolean isModified () const
 Returns IlTrue if the rows of the table have been modified since the last time. More...
 
virtual IlBoolean isQueryModeSupported () const
 Returns IlTrue if the table supports query mode. More...
 
IlBoolean isReadOnly () const
 Returns IlTrue if the table is read-only. More...
 
virtual IlBoolean isSelectDone () const
 Returns IlTrue if the select() member function has been called since the object was constructed. More...
 
virtual IliTablemakeQueryTable () const
 Returns a memory table having the same number of columns as this table. More...
 
virtual IlBoolean moveRow (IlInt from, IlInt to)
 Moves a row. More...
 
virtual IlBoolean moveRowInCache (IlInt from, IlInt to)
 Moves a row. More...
 
IliTablePropertyManagernewNamedPropertyManager (const char *name)
 Creates and returns a new named property manager. More...
 
virtual IliTablePropertyManagernewPropertyManager ()
 Creates and returns a new anonymous property manager. More...
 
virtual IlBoolean refreshAndLockRow (IlInt rowno)
 Refreshes and lock a row. More...
 
virtual IlBoolean refreshRow (IlInt rowno)
 Refreshes a row. More...
 
void releaseBuffer (IliTableBuffer *buff)
 Releases a table buffer. More...
 
void removeErrorSink (IliErrorSink *sink)
 Removes an error sink from this table. More...
 
void removeNamedPropertyManager (const char *name)
 Removes a property manager. More...
 
void removeProperty (IlInt rowno, IlInt colno, const IlvSymbol *propName)
 Removes a property from the part of the table. More...
 
virtual IlBoolean select ()
 Reads all rows from a remote database. More...
 
IlBoolean set (IlInt rowno, IliName colname, const IliValue &value)
 Sets a value. More...
 
IlBoolean set (IlInt rowno, IlInt colno, const IliValue &value)
 Sets a value. More...
 
void setColumnForeignDataSourceName (IlInt colno, const char *dsname)
 Sets the name of the foreign data source for one column. More...
 
void setColumnForeignDisplayColumn (IlInt colno, const char *name)
 Sets the name of the display column in the foreign table. More...
 
void setColumnForeignTable (IlInt colno, IliTable *table)
 Sets the foreign table of one column. More...
 
void setColumnForeignValueColumn (IlInt colno, const char *name)
 Sets the name of the value column in the foreign table. More...
 
void setColumnValueConstrained (IlInt colno, IlBoolean flag)
 Specifies that the column is constrained to take its values from the domain of the value column of the foreign table. More...
 
void setCompareFunction (IliCompareFunction fct, IlAny arg=0)
 Defines the function and user data that must be used to compare two rows. More...
 
void setGadgetHolder (IlvGadgetHolder *gadHold)
 Attaches the table to a gadget holder. More...
 
IlBoolean setInCache (IlInt rowno, IlInt colno, const IliValue &value)
 Sets a value. More...
 
virtual void setModified (IlBoolean flag)
 Sets the value of the modified property of the table. More...
 
void setParameterColumnName (IlInt paramno, const char *colname)
 Attaches a parameter to one column. More...
 
void setParameterDataSourceName (IlInt paramno, const char *dsname)
 Attaches one parameter to one data source. More...
 
void setParameterMaxLength (IlInt paramno, IlInt maxlen)
 Sets the maximum length allowed for the parameter. More...
 
void setParameterName (IlInt paramno, const char *name)
 Sets a parameter name. More...
 
void setParameterType (IlInt paramno, const IliDatatype *type)
 Sets the type of one parameter. More...
 
void setParameterValue (IliName paramName, const IliValue &value)
 Sets the value of one parameter. More...
 
void setParameterValue (IlInt paramno, const IliValue &value)
 Sets the value of one parameter. More...
 
void setProperty (IlInt rowno, IlInt colno, const IlvSymbol *propName, const IliValue &propVal)
 Sets a property value to a part of the table. More...
 
virtual void setReadOnly (IlBoolean readOnly)
 Specifies whether the table is read-only. More...
 
void setTransactionManager (IliTransactionManager *tm)
 Changes the transaction that manages this table. More...
 
void setTransactionManagerName (const char *name)
 Changes the transaction that manages this table. More...
 
void sortRows (const IlInt *colnoArray, IlInt columnsCount, IlInt fromRow=0, IlInt toRow=-1, IliCompareFunction fct=0, IlAny data=0)
 Sorts a set of rows. More...
 
virtual IlBoolean updateRow (IlInt rowno, IliTableBuffer *buff)
 Updates a row with the values in the table buffer. More...
 
virtual IlBoolean updateRowInCache (IlInt rowno, IliTableBuffer *buff)
 Updates a row. More...
 
virtual void write (IL_STDPREF ostream &) const
 Writes the definition of a schema to an output stream in a form suitable to be read back by the stream-based constructor. More...
 
void writeTable (std::ostream &output) const
 Writes the definition of the table to an output stream, in a form suitable to be read back by the ReadTable() static member function. More...
 
- Public Member Functions inherited from IliSchema
 IliSchema (const IliSchema &)
 This is the copy constructor of the IliSchema class.
 
 IliSchema (IlvDisplay *display)
 This constructor initializes a schema object. More...
 
 IliSchema (IlvDisplay *display, IL_STDPREF istream &input)
 This constructor initializes a schema by reading its definition from an input stream. More...
 
void addHook (IliTableHook *hook)
 Adds a hook to the list of hooks of the schema object. More...
 
virtual IlBoolean allowColumnMove () const
 Returns IlTrue if columns can be moved to this schema. More...
 
IlInt appendColumn (const char *name, const IliDatatype *type, IlInt maxlen=-1)
 Appends a new column to the schema. More...
 
const IliDatatypeasDatatype () const
 Returns the data type that is defined by this schema. More...
 
virtual IlBoolean deleteColumn (IlInt colno)
 Deletes a column. More...
 
void endOfBatch ()
 Used in conjunction with the startOfBatch() member function to terminate a series of modifications on the schema. More...
 
IlvAlignment getColumnAlignment (IlInt colno) const
 Returns the column alignment. More...
 
const char * getColumnDefault (IlInt colno) const
 Returns the default value for one column. More...
 
IlInt getColumnDisplayWidth (IlInt colno) const
 Returns the display width, in pixels, of one column. More...
 
const IliFormatgetColumnFormat (IlInt colno) const
 Returns the format of one column. More...
 
IlInt getColumnIndex (const char *name) const
 Returns the position of the column. More...
 
IlInt getColumnIndex (IlInt token) const
 Returns the position of the column. More...
 
const char * getColumnLabel (IlInt colno) const
 Returns the label of one column. More...
 
const IliInputMaskgetColumnMask (IlInt colno) const
 Returns the input mask of one column. More...
 
IlInt getColumnMaxLength (IlInt colno) const
 Returns the maximum length allowed for one column. More...
 
const char * getColumnName (IlInt colno) const
 Returns the name of the column. More...
 
IlInt getColumnsCount () const
 Returns the number of columns in the schema. More...
 
const char * getColumnTitle (IlInt colno) const
 Returns the title of one column. More...
 
IlInt getColumnToken (IlInt colno) const
 Returns the token of the column. More...
 
const IliDatatypegetColumnType (IlInt colno) const
 Returns the type of the column. More...
 
IlvDisplaygetDisplay () const
 Returns the display of the schema object. More...
 
const char * getElementTypeName () const
 Returns the type name of the objects in the collection. More...
 
IliSchemagetNestedSchema (const IliAttributePath &path)
 Returns the nested schema. More...
 
const IliSchemagetNestedSchema (const IliAttributePath &path) const
 Returns the nested schema. More...
 
const char * getSchemaName () const
 Returns the schema name. More...
 
IlBoolean hasHook (IliTableHook *hook) const
 Returns IlTrue if the hook is already into the list of hooks of the schema object. More...
 
virtual IlBoolean insertColumn (IlInt colno, const char *colname, const IliDatatype *type, IlInt maxlen=-1)
 Inserts a new column in the schema. More...
 
IlBoolean isACollection () const
 Returns IlTrue if the schema defines a type that is a collection of objects or values. More...
 
IlBoolean isASimpleCollection () const
 Returns IlTrue if the schema is defined as a simple collection type. More...
 
IlBoolean isColumnNullable (IlInt colno) const
 Returns IlTrue if the column allows null values. More...
 
IlBoolean isColumnPartOfKey (IlInt colno) const
 Returns IlTrue if the column is part of the primary key of the schema. More...
 
IlBoolean isColumnReadOnly (IlInt colno) const
 Returns IlTrue if the column is read-only. More...
 
IlBoolean isColumnVisible (IlInt colno) const
 Returns IlTrue if the column should be visible. More...
 
IlBoolean isPrimaryKeyDefined () const
 Returns IlTrue if the schema has one or more columns defined as being part of the primary key. More...
 
virtual IlBoolean moveColumn (IlInt from, IlInt to)
 Moves a column. More...
 
void removeHook (IliTableHook *hook)
 Removes a hook from the list of hooks of the schema object. More...
 
void setAsCollection (IlBoolean flag)
 Sets the schema as a collection type. More...
 
void setAsSimpleCollection (IlBoolean flag)
 Sets the schema as a simple collection type. More...
 
virtual void setColumnAlignment (IlInt colno, IlvAlignment align)
 Sets the alignment of one column. More...
 
virtual void setColumnDefault (IlInt colno, const char *val)
 Sets the default value for one column. More...
 
virtual void setColumnDisplayWidth (IlInt colno, IlInt width)
 Sets the display width of one column. More...
 
virtual void setColumnFormat (IlInt colno, const IliFormat &fmt)
 Sets the format of the column. More...
 
virtual void setColumnLabel (IlInt colno, const char *label)
 Sets the label of one column. More...
 
virtual void setColumnMask (IlInt colno, const IliInputMask &mask)
 Sets the input mask of one column. More...
 
virtual void setColumnMaxLength (IlInt colno, IlInt maxlen)
 Sets the maximum length for one column. More...
 
virtual void setColumnName (IlInt colno, const char *colname)
 Sets the name of the column. More...
 
virtual void setColumnNullable (IlInt colno, IlBoolean nullable)
 Determines if the column positioned at colno is nullable (that is, may contain null values). More...
 
virtual void setColumnPartOfKey (IlInt colno, IlBoolean partOfKey)
 Specifies whether the column is part of the primary key. More...
 
virtual void setColumnReadOnly (IlInt colno, IlBoolean readOnly)
 Specifies whether a column is read-only. More...
 
virtual void setColumnTitle (IlInt colno, const char *title)
 Sets the title of one column. More...
 
virtual void setColumnType (IlInt colno, const IliDatatype *type)
 Sets the type of the column. More...
 
virtual void setColumnVisible (IlInt colno, IlBoolean visible)
 Sets the column visibility. More...
 
void setElementTypeName (const char *name)
 Sets the element type name. More...
 
void setSchemaName (const char *name)
 Sets the schema name. More...
 
void startOfBatch ()
 Used to start a series of modifications on the schema object. More...
 
- Public Member Functions inherited from IliRefCounted
IlInt getRefCount () const
 Returns the reference count of the object. Initially, this property is set to 0. More...
 
void lock () const
 Increments the reference count of the object.
 
void unLock () const
 Decrements the reference count of the object. More...
 

Static Public Member Functions

static IliTableReadTable (IlvDisplay *disp, std::istream &input)
 Constructs and returns an instance of a subclass of IliTable by reading its definition from an input stream. More...
 

Protected Member Functions

virtual void cellChanged (IlInt rowno, IlInt colno)
 Called just after a cell has changed. More...
 
virtual void raiseError (const IliErrorMessage &msg) const
 Called each time an error occurs. More...
 
virtual void rowChanged (IlInt rowno)
 Called just after the row at position rowno has changed (that is, when one or more values in the row have changed). More...
 
virtual void rowDeleted (IlInt rowno)
 Called just after a row has been removed from the table. More...
 
virtual void rowFetched (IlInt rowno)
 Called just after a new row has been fetched from a remote database and inserted. More...
 
virtual void rowInserted (IlInt rowno)
 Called just after a new row has been inserted. More...
 
virtual void rowMoved (IlInt src, IlInt dest)
 Called just after a row has moved. More...
 
virtual void rowToBeChanged (IlInt rowno)
 Called just before the row is changed. More...
 
virtual void rowToBeDeleted (IlInt rowno)
 Called just before a row is removed from the table. More...
 
virtual void tableChanged ()
 Called when the IliTable object has undergone a significant number of changes. More...
 
- Protected Member Functions inherited from IliRefCounted
virtual ~IliRefCounted ()
 This is the virtual destructor of the IliRefCounted class. More...
 

Friends

class IliMemoryTable
 
class IliTransactionManager
 

Detailed Description

Table class.

Library: dataccess

The IliTable class is an abstract class that defines objects capable of managing an ordered collection of rows. Each of these rows conforms to the same schema. Since the IliTable class is abstract, it defines a protocol for creating, editing, and inspecting a table object. This protocol is implemented in subclasses of the IliTable class. In addition to having a schema, a table has a set of parameters. A table also manages a set of rows. Some of the IliTable subclasses, such as IliMemoryTable or IliStringsTable, manage rows themselves. They are called one-tier tables. Other subclasses, such as IliSQLTable, manage rows located in a remote database. They are called two-tier tables. Some of the member functions of the IliTable class, behave differently in these two types of tables. It should be noted that a two-tier table implements a local row cache, where it stores a copy of some of the remote rows to which the table is mapped at any particular time. The purpose of this cache is to reduce communication overheads with the remote database engine, and to allow you to overcome the fact that many database systems do not provide random access to their data. In this situation, a subset of the database rows is copied and stored in the local row cache allowing the table object to provide random access to these rows. The IliTable class does not support the concept of a current row. This is due to the fact that such a concept would not allow many users to simultaneously access the table, each with their own current row. Instead, a companion class, IliTableBuffer, is provided. This class implements the notion of current row, allowing many simultaneous users of an IliTable object.

See also
IliDataSource, IliErrorList, IliErrorMessage, IliErrorSink, IliName, IliRowPtr, IliTableBuffer, IliTableGadget, IliTableHook, IliTablePropertyManager, IliTransactionManager, IlvGadgetHolder.

Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\n\nThis class inherits the accessors of its superclass \c IliSchema and adds the following ones:

Name Type Equivalent methods
fetchCompleted Boolean fetchCompleted()
parametersCount Int getParametersCount()
properties IliTablePropertyManager new IliTablePropertyManager(this)
readOnly Boolean isReadOnly(), setReadOnly()
rowsCount Int getRowsCount()
selectDone Boolean isSelectDone()
transactionManager IliTransactionManager getTransactionManager()
transactionManagerName String getTransactionManagerName(), setTransactionManagerName()

Method accessors

Name Return type Equivalent methods
addErrorSink(Object sink) Void See [addErrorSink] below.
appendRow(IliTableBuffer buffer) Int appendRow(buffer)
appendRowInCache(IliTableBuffer buffer) Int appendRowInCache(buffer)
applyQueryMode(IliTable queryTable) Boolean applyQueryMode(queryTable)
at(Int row, Int col) Object at(row, col)
clearRows() Void clearRows()
deleteRow(Int row) Boolean deleteRow(row)
deleteRowInCache(Int row) Boolean deleteRowInCache(row)
fetchAll() Int fetchAll()
getBuffer() IliTableBuffer new IliTableBuffer(this)
getNamedPropertyManager(String name) IliTablePropertyManager getNamedPropertyManager(name)
getNamedPropertyManagerCount() Int getNamedPropertyManagerCount()
getParameter(String paramName) Object Parameters[getParameterIndex(paramName)]
getParameterAt(Int paramNo) Object Parameters[paramNo]
getPropertyManagerNameAt(Int index) String getPropertyManagerNameAt(index)
insertRow(Int row, IliTableBuffer buffer) Boolean insertRow(row, buffer)
insertRowInCache(Int row, IliTableBuffer buffer) Boolean insertRowInCache(row, buffer)
isQueryModeSupported() Boolean isQueryModeSupported()
makeQueryTable() IliTable makeQueryTable()
moveRow(Int from, Int to) Boolean moveRow(from, to)
moveRowInCache(Int from, Int to) Boolean moveRowInCache(from, to)
newNamedPropertyManager(String name) IliTablePropertyManager newNamedPropertyManager(name)
refreshAndLockRow(Int row) Boolean refreshAndLockRow(row)
refreshRow(Int row) Boolean refreshRow(row)
removeErrorSink(Object sink) Void See [addErrorSink] below.
removeNamedPropertyManager(String name) Void removeNamedPropertyManager(name)
select() Boolean select()
updateRow(Int row, IliTableBuffer buffer) Boolean updateRow(row, buffer)
updateRowInCache(Int row, IliTableBuffer buffer) Boolean updateRowInCache(row, buffer)

[addErrorSink] The sink parameter can be either:

Member Function Documentation

◆ addErrorSink()

void IliTable::addErrorSink ( IliErrorSink sink)

Adds an error sink.

All errors that are thrown by one of the raiseError() member functions will be forwarded to this error sink. Note that the table will not delete the error sink at destruction time, so the same error sink may be safely shared among many tables.

Parameters
sinkThe error sink.

◆ allowRowMove()

virtual IlBoolean IliTable::allowRowMove ( ) const
virtual

Returns IlTrue if the table (or subclass of the table) allows row move operations.

Returns
IlTrue if the table (or subclass of the table) allows row move operations.

Reimplemented in IliStringsTable, and IliMemoryTable.

◆ appendParameter()

IlInt IliTable::appendParameter ( const char *  paramName,
const IliDatatype type,
IlInt  maxlen = -1 
)

Appends a new parameter to the table parameters.

Parameters
paramNameThe parameter name, it is copied.
typeThe parameter type.
maxlenThe maximum length.
Returns
The position of the newly created parameter.

◆ appendRow()

IlInt IliTable::appendRow ( IliTableBuffer tblBuf)

Appends a new row defined by the table buffer.

Parameters
tblBufThe table buffer.
Returns
The position of the new row, or -1 if it fails. If the table (or subclass of the table) defines a mapping with a remote database, the row is also inserted in the remote database.

◆ appendRowInCache()

IlInt IliTable::appendRowInCache ( IliTableBuffer tblBuf)

Appends a new row defined by the table buffer.

This member function is similar to the appendRow() member function except that it appends only the row in the local row cache if this table is a two-tier table.

Parameters
tblBufThe table buffer.
Returns
The position of the new row, or -1 if it fails. If the table (or subclass of the table) defines a mapping with a remote database, the row is also inserted in the remote database.

◆ applyQueryMode()

virtual IlBoolean IliTable::applyQueryMode ( IliTable queryTable)
virtual

Applies the query specified by the conditions contained in the provided table.

If query mode is supported, applies the query specified by the conditions contained in the queryTable() parameter, which is expected to be a table obtained by calling the makeQueryTable() virtual member function.

Parameters
queryTableThe table.
Returns
IlTrue if successful.

Reimplemented in IliSQLTable.

◆ at() [1/2]

IliValue IliTable::at ( IlInt  rowno,
IliName  colname 
) const

Returns a value.

Parameters
rownoThe row position.
colnameThe name of the column.
Returns
The value in the row positioned at rowno for the column named colname.

◆ at() [2/2]

IliValue IliTable::at ( IlInt  rowno,
IlInt  colno 
) const

Returns a value.

Parameters
rownoThe row position.
colnoThe column position.
Returns
The value in the row positioned at rowno for the column positioned at colno. This member function is similar to the getValue() member function, except that it does not report any errors that may have occurred.

◆ cellChanged()

virtual void IliTable::cellChanged ( IlInt  rowno,
IlInt  colno 
)
protectedvirtual

Called just after a cell has changed.

If more than one value has changed in a row, it is preferable to call the rowChanged() member function once, instead of calling cellChanged() many times.

Parameters
rownoThe row position.
colnoThe column position.

◆ checkConstraints()

virtual IlBoolean IliTable::checkConstraints ( IlInt  rowno,
IliTableBuffer buff 
) const
virtual

Validates the table buffer data.

Parameters
rownoThe row position.
buffThe table buffer.
Returns
IlTrue if the buff table buffer contains a valid row as defined by the constraints specified in the schema of the table. If the rowno parameter is equal to -1, the buff parameter is assumed to contain a row that will be inserted into the table. Otherwise, rowno must designate an existing row, and buff is assumed to contain a replacement for that row. The constraints that are checked by this member function are the primary key constraint, the NOT NULL constraint, and the maximum length column constraint.

◆ clearRows()

virtual void IliTable::clearRows ( )
virtual

Deletes all rows.

If the table (or subclass of the table) defines a mapping with a remote database, then only the rows in the IliTable object are deleted. The rows in the remote database are not affected by this operation. This enables the row cache of such a table to be cleared.

Reimplemented in IliStringsTable, IliSQLTable, and IliMemoryTable.

◆ copyTable()

IliTable* IliTable::copyTable ( ) const

Returns a copy of the table.

This member function can copy any subclass of IliTable.

Returns
The table.

◆ deleteParameter()

void IliTable::deleteParameter ( IlInt  paramno)

Deletes a parameter.

Parameters
paramnoThe parameter position.

◆ deleteRow()

virtual IlBoolean IliTable::deleteRow ( IlInt  rowno)
virtual

Deletes a row.

Parameters
rownoThe row position.
Returns
IlTrue if successful and IlFalse if rowno is out of bounds, or if the row could not be deleted. If the table (or subclass of the table) defines a mapping with a remote database, the row is also deleted in the remote database.

Reimplemented in IliStringsTable, IliSQLTable, and IliMemoryTable.

◆ deleteRowInCache()

virtual IlBoolean IliTable::deleteRowInCache ( IlInt  rowno)
virtual

Deletes a row.

This virtual member function is similar to the deleteRow() member function except that it only deletes the row in the local row cache if this table is a two-tier table.

Parameters
rownoThe row position.
Returns
IlTrue if successful and IlFalse if rowno is out of bounds, or if the row could not be deleted. If the table (or subclass of the table) defines a mapping with a remote database, the row is also deleted in the remote database.

Reimplemented in IliMemoryTable.

◆ enableColumnCompletion()

void IliTable::enableColumnCompletion ( IlInt  colno,
IlBoolean  flag 
)

Specifies whether completion is enabled for the column.

Parameters
colnoThe column name.
flagThe completion flags.

◆ exchangeRows()

virtual IlBoolean IliTable::exchangeRows ( IlInt  rowno1,
IlInt  rowno2 
)
virtual

Exchanges two rows.

Parameters
rowno1The first row position.
rowno2The second row position.
Returns
IlTrue if successful. If the table (or subclass of the table) defines a mapping with a remote database, the rows are also exchanged in the remote database (if possible).

Reimplemented in IliSQLTable, and IliMemoryTable.

◆ exchangeRowsInCache()

virtual IlBoolean IliTable::exchangeRowsInCache ( IlInt  rowno1,
IlInt  rowno2 
)
virtual

Exchanges two rows.

This virtual member function is similar to the exchangeRows() member function except that it exchanges only the rows in the local row cache.

Parameters
rowno1The first row position.
rowno2The second row position.
Returns
IlTrue if successful. If the table (or subclass of the table) defines a mapping with a remote database, the rows are also exchanged in the remote database (if possible).

Reimplemented in IliMemoryTable.

◆ fetchAll()

virtual IlInt IliTable::fetchAll ( )
virtual

Fetches all remaining rows and stores them in the local row cache.

Returns
The number of rows effectively fetched.

Reimplemented in IliSQLTable.

◆ fetchCompleted()

virtual IlBoolean IliTable::fetchCompleted ( ) const
virtual

Returns IlTrue, if all the rows have been fetched from the database and stored in the local row cache.

The table (or subclass of the table) must define a mapping with a database.

Returns
IlTrue, if all the rows have been fetched from the database and stored in the local row cache.

Reimplemented in IliSQLTable.

◆ fetchNext()

virtual IlInt IliTable::fetchNext ( IlInt  count = 1)
virtual

Fetches up a number of rows from the database and stores them in the local row cache.

Parameters
countThe row count.
Returns
The number of rows effectively fetched.

Reimplemented in IliSQLTable.

◆ findFirstRow()

IlInt IliTable::findFirstRow ( const IliValue value,
IlInt  colno,
IlBoolean  complete,
IlInt  fromRow = 0,
IlInt  toRow = -1 
) const

Searches for a row located between two positions.

Parameters
valueThe value.
colnoThe column position.
completeThe complete flag. To make a match when the parameter is IlTrue, the character string representation of the value parameter may be a prefix of the character string representation of the value contained in the colno column of the row. In this case, if several rows correspond to the prefix, the function returns the position of the first row to which it corresponds.
fromRowThe start position.
toRowThe last row position. If equals -1 then all rows starting at fromRow are located. The first of these rows that contains a value equal to the value in the column is the match.
Returns
The row position if successful. Otherwise returns -1.

◆ findRow()

IlInt IliTable::findRow ( const IliValue value,
IlInt  colno,
IlBoolean  complete,
IlInt  fromRow = 0,
IlInt  toRow = -1 
) const

Searches for a row located between two positions.

Parameters
valueThe value.
colnoThe column position.
completeThe complete flag. To make a match when the parameter is IlTrue, the character string representation of the value parameter may be a prefix of the character string representation of the value contained in the colno column of the row. In this case, if several rows correspond to the prefix, the function returns -1.
fromRowThe start position.
toRowThe last row position. If equals -1 then all rows starting at fromRow are located. The first of these rows that contains a value equal to the value in the column is a match.
Returns
The row position if successful. Otherwise returns -1.

◆ getBuffer()

IliTableBuffer* IliTable::getBuffer ( )

Returns a table buffer for the table.

A table buffer is used to inspect, alter or add rows into the table. Any table buffer obtained through this member function should be returned to the table when finished, using the releaseBuffer() member function.

Returns
The table buffer.

◆ getColumnDisplayValue()

IlBoolean IliTable::getColumnDisplayValue ( IlInt  colno,
const IliValue value,
IliValue displayValue,
IlvGraphicHolder h = 0 
)

Returns the display value for a value.

If the column has an effective foreign table, this member function attempts to map the value parameter through the effective foreign table yielding a display value. If the column does not have an effective foreign table, the value is copied into the display value.

Parameters
colnoThe column name.
valueThe value.
displayValueThe display value.
hThe holder. It is used to resolve the foreign data source.
Returns
IlTrue if successful.

◆ getColumnEffectiveForeignTable()

IliTable* IliTable::getColumnEffectiveForeignTable ( IlInt  colno,
IlvGraphicHolder h = 0 
) const

Returns the effective foreign table.

If a foreign table has been specified with the getColumnForeignTable() member function for one column, this table is returned. Otherwise, if a foreign data source name has been specified with the getColumnForeignDataSourceName(), this name is resolved to a data source (by way of the IliRepository object and the holder) and if a data source with that name is found, it is returned. Otherwise, 0 is returned.

Parameters
colnoThe column name.
hThe holder.
Returns
The foreign table.

◆ getColumnForeignDataSourceName()

const char* IliTable::getColumnForeignDataSourceName ( IlInt  colno) const

Returns the name of the data source that will provide a foreign table for one column.

Parameters
colnoThe column position.
Returns
0 if position is out of bounds, and an empty string if no foreign data source is defined for the column.

◆ getColumnForeignDisplayColumn()

const char* IliTable::getColumnForeignDisplayColumn ( IlInt  colno) const

Returns the name of the display column in the foreign table.

The column which is used to find a replacement value for the column.

Parameters
colnoThe column position.
Returns
The name.

◆ getColumnForeignTable()

IliTable* IliTable::getColumnForeignTable ( IlInt  colno) const

Returns the foreign table of one column.

Returns
The foreign table or 0 if this column does not have a foreign table.

◆ getColumnForeignValueColumn()

const char* IliTable::getColumnForeignValueColumn ( IlInt  colno) const

Returns the name of the value column in the foreign table.

The column which the value in the column must be matched with, to yield a display value.

Parameters
colnoThe column position.
Returns
The name of the value column in the foreign table.

◆ getCompareData()

IlAny IliTable::getCompareData ( ) const

Returns the user data that can be used to compare two rows.

Returns
The user data.

◆ getCompareFunction()

IliCompareFunction IliTable::getCompareFunction ( ) const

Returns the function that is used to compare two rows.

Returns
The function.

◆ getDefaultPropertyManager() [1/2]

IliTablePropertyManager* IliTable::getDefaultPropertyManager ( )

Returns the default property manager.

Returns
The default property manager of the IliTable object.

◆ getDefaultPropertyManager() [2/2]

const IliTablePropertyManager* IliTable::getDefaultPropertyManager ( ) const

Returns the default property manager.

Returns
The default property manager of the IliTable object.

◆ getGadgetHolder()

IlvGadgetHolder* IliTable::getGadgetHolder ( ) const

Returns the gadget holder to which the table is attached.

A table must be attached to a gadget holder for the getParameterDataSourceValue() member function to work correctly.

Returns
The gadget holder to which the table is attached, or 0 if the table is not attached to a gadget holder.

◆ getNamedPropertyManager()

IliTablePropertyManager* IliTable::getNamedPropertyManager ( const char *  name) const

Returns a property manager from its name.

Parameters
nameThe property manager name.
Returns
The property manager named name if it exists and 0 otherwise.

◆ getNamedPropertyManagerCount()

IlInt IliTable::getNamedPropertyManagerCount ( ) const

Returns the number of named property managers.

Returns
The count.

◆ getParameterColumnName()

const char* IliTable::getParameterColumnName ( IlInt  paramno) const

Returns the name of the column, which the parameter is attached to.

Parameters
paramnoThe parameter position.
Returns
The name or 0 if position is out of bounds, and an empty string if the parameter is not attached to a column.

◆ getParameterDataSourceName()

const char* IliTable::getParameterDataSourceName ( IlInt  paramno) const

Returns the name of the data source which the parameter is attached to.

Parameters
paramnoThe parameter position.
Returns
The data source name or 0 if position is out of bounds, and an empty character string if the parameter is not attached to a data source.

◆ getParameterDataSourceValue()

IliValue IliTable::getParameterDataSourceValue ( IlInt  paramno) const

Returns the current value of one parameter.

This member function takes into account any data source or column that the parameter may be attached to.

Parameters
paramnoThe parameter position.
Returns
The value.

◆ getParameterIndex()

IlInt IliTable::getParameterIndex ( const char *  name) const

Returns the position of one parameter.

Parameters
nameThe parameter name.
Returns
The position, otherwise -1 if no such parameter is found.

◆ getParameterMaxLength()

IlInt IliTable::getParameterMaxLength ( IlInt  paramno) const

Returns the maximum length allowed for one parameter.

A value of -1 means that the length is not constrained.

Parameters
paramnoThe parameter position.
Returns
The maximum length.

◆ getParameterName()

const char* IliTable::getParameterName ( IlInt  paramno) const

Returns a parameter name.

Parameters
paramnoThe parameter position.
Returns
The name otherwise 0 if position is out of bounds.

◆ getParametersCount()

IlInt IliTable::getParametersCount ( ) const

Returns the number of parameters defined for this table.

Returns
The count.

◆ getParameterType()

const IliDatatype* IliTable::getParameterType ( IlInt  paramno) const

Returns the parameter type.

Parameters
paramnoThe parameter position.
Returns
The type, otherwise 0 if position is out of bounds.

◆ getParameterValue() [1/2]

IliValue IliTable::getParameterValue ( IliName  paramName) const

Returns the current value of one parameter.

This member function does not take into account any data source or column which the parameter may be attached to.

Parameters
paramNameThe parameter name.
Returns
The value.

◆ getParameterValue() [2/2]

IliValue IliTable::getParameterValue ( IlInt  paramno) const

Returns the current value of one parameter.

This member function does not take into account any data source or column which the parameter may be attached to.

Parameters
paramnoThe parameter position.
Returns
The value.

◆ getProperty()

IlBoolean IliTable::getProperty ( IlInt  rowno,
IlInt  colno,
const IlvSymbol propName,
IliValue propVal 
) const

Returns a property value attached to the part of the table.

This member function accesses the default property manager.

Parameters
rownoThe row position.
colnoThe column position.
propNameThe property name.
propValThe value.
Returns
IlTrue if successful.

◆ getPropertyCount()

IlInt IliTable::getPropertyCount ( IlInt  rowno,
IlInt  colno 
) const

Returns the property count attached to the part of the table.

This member function accesses the default property manager.

Parameters
rownoThe row position.
colnoThe column position.
Returns
The number of properties attached.

◆ getPropertyManagerNameAt()

const char* IliTable::getPropertyManagerNameAt ( IlInt  idx) const

Returns the name of the named property manager.

Parameters
idxThe property manager position. It must be between 0 and getNamedPropertyManagerCount().
Returns
The name.

◆ getPropertyNameAt()

const IlvSymbol* IliTable::getPropertyNameAt ( IlInt  rowno,
IlInt  colno,
IlInt  propIndex 
) const

Returns a property name attached to the part of the table.

This member function accesses the default property manager.

Parameters
rownoThe row position.
colnoThe column position.
propIndexThe property index. The value must be between 0 and getPropertyCount().
Returns
The name of the property of the part identified by rowno and colno positioned at propIndex.

◆ getRowPtr()

IliRowPtr IliTable::getRowPtr ( IlInt  rowno = -1) const

Returns an IliRowPtr that points to one row.

Parameters
rownoThe row position.
Returns
An IliRowPtr that points to the row at position rowno (or to no row if rowno is -1 or if it is out of bounds).

◆ getRowsCount()

virtual IlInt IliTable::getRowsCount ( ) const
virtual

Returns the number of rows in the table.

Returns
The count.

Reimplemented in IliStringsTable, IliSQLTable, IliMemoryTable, and IliMapTable.

◆ getRowStatus()

virtual IliRowStatus IliTable::getRowStatus ( IlInt  rowno) const
virtual

Returns the status of one row.

This is useful when a transaction manager manages the table. The row status can be one of the following:

  • IliNotARow The row index is out of bounds.
  • IliRegularRow The row has not been touched in the current local transaction.
  • IliInsertedRow The row has been inserted in the current local transaction.
  • IliUpdatedRow The row has been updated in the current local transaction.
  • IliDeletedRow The row has been deleted in the current local transaction.

The "current local transaction" refers to the changes that have occurred since the most recent call to one of the following member functions (assuming the transaction manager is currently started):

Note that the IliDeletedRow tag is never returned since a deleted row has no row index. This exists and is mentioned here for your information only.

Parameters
rownoThe row position.
Returns
The status.

Reimplemented in IliMemoryTable.

◆ getTransactionManager()

IliTransactionManager* IliTable::getTransactionManager ( ) const

Returns the transaction manager managing the table.

Initially, this property is 0.

Returns
The transaction manager managing the table or 0 if the table is not managed by a transaction manager.

◆ getTransactionManagerName()

const char* IliTable::getTransactionManagerName ( ) const

Returns the name of the transaction manager that manages the table.

Returns
The name of the transaction manager that manages the table. It returns 0 if the table is not managed by a transaction manager or if it is managed by an anonymous transaction manager.

◆ getValue()

virtual IlBoolean IliTable::getValue ( IlInt  rowno,
IlInt  colno,
IliValue value 
) const
virtual

Returns a value.

This member function handles the fetching of the row (and all preceding rows) as necessary.

Parameters
rownoThe row position.
colnoThe column position.
valueThe value.
Returns
IlTrue if successful.

Reimplemented in IliSQLTable, IliMemoryTable, IliStringsTable, and IliMapTable.

◆ insertRow()

virtual IlBoolean IliTable::insertRow ( IlInt  rowno,
IliTableBuffer buff 
)
virtual

Inserts a row that is defined by the table buffer.

Not all the values are used to insert the row, instead the values for which the isModified() are used, the others being replaced by null values. Note that this member function does not check any of the constraints defined in the schema. If the table (or subclass of the table) defines a mapping with a remote database, the row is also inserted in the remote database.

Parameters
rownoThe row position.
buffThe table buffer.
Returns
IlTrue if successful, and IlFalse if rowno is out of bounds, or if the row could not be inserted.

Reimplemented in IliStringsTable, IliSQLTable, and IliMemoryTable.

◆ insertRowInCache()

virtual IlBoolean IliTable::insertRowInCache ( IlInt  rowno,
IliTableBuffer buff 
)
virtual

Inserts a row that is defined by the table buffer.

This virtual member function is similar to the insertRow() member function except that it only inserts the row in the local row cache if this table is a two-tier table.

Parameters
rownoThe row position.
buffThe table buffer.
Returns
IlTrue if successful, and IlFalse if rowno is out of bounds, or if the row could not be inserted.

Reimplemented in IliMemoryTable.

◆ insertRowsFrom()

virtual IlBoolean IliTable::insertRowsFrom ( const IliTable src,
IlInt  srcFromRow = 0,
IlInt  srcToRow = -1,
IlBoolean  stopAtFirstError = IlTrue,
IlInt  insertAt = -1 
)
virtual

Inserts rows into this table by copying them from another table.

The rows are taken from the src parameter, starting from srcFromRow up to srcToRow (or up to the end of src if srcToRow is less than 0). The only constraint on table src is that it must have a schema identical to that of this table. In other words, it must have the same number of columns and the columns must have compatible data types.

Parameters
srcThe source table.
srcFromRowThe first row position of the source table.
srcToRowThe last row position of the source table.
stopAtFirstErrorIf IlTrue, the process of inserting rows will stop as soon as an error is caught. Otherwise, the maximum possible number of rows will be copied.
insertAtThe insertion position.
Returns
IlTrue if it is successful and IlFalse otherwise.

◆ isColumnCompletionEnabled()

IlBoolean IliTable::isColumnCompletionEnabled ( IlInt  colno) const

Returns IlTrue if completion is enabled for the column.

Parameters
colnoThe column name.
Returns
IlTrue if completion is enabled for the column.

◆ isColumnValueConstrained()

IlBoolean IliTable::isColumnValueConstrained ( IlInt  colno) const

Returns IlTrue if the column is constrained to taking its values from the domain of the value column of the foreign table.

Parameters
colnoThe column position.
Returns
The constraint flag.

◆ isModified()

IlBoolean IliTable::isModified ( ) const

Returns IlTrue if the rows of the table have been modified since the last time.

Returns
IlTrue if the rows of the table have been modified since the last time.

◆ isQueryModeSupported()

virtual IlBoolean IliTable::isQueryModeSupported ( ) const
virtual

Returns IlTrue if the table supports query mode.

Returns
IlTrue if the table supports query mode.

Reimplemented in IliSQLTable.

◆ isReadOnly()

IlBoolean IliTable::isReadOnly ( ) const

Returns IlTrue if the table is read-only.

Returns
The read-only state.

◆ isSelectDone()

virtual IlBoolean IliTable::isSelectDone ( ) const
virtual

Returns IlTrue if the select() member function has been called since the object was constructed.

Returns
IlTrue if the select() member function has been called since the object was constructed.

Reimplemented in IliSQLTable.

◆ makeQueryTable()

virtual IliTable* IliTable::makeQueryTable ( ) const
virtual

Returns a memory table having the same number of columns as this table.

If query mode is supported, creates and returns a memory table having the same number of columns as this table. The returned memory table columns are all of the String type.

Returns
The table.

Reimplemented in IliSQLTable.

◆ moveRow()

virtual IlBoolean IliTable::moveRow ( IlInt  from,
IlInt  to 
)
virtual

Moves a row.

Parameters
fromThe origin row position.
toThe destination row position.
Returns
IlTrue if successful. If the table (or subclass of the table) defines a mapping with a remote database, the row is also moved in the remote database (if possible).

Reimplemented in IliStringsTable, IliSQLTable, and IliMemoryTable.

◆ moveRowInCache()

virtual IlBoolean IliTable::moveRowInCache ( IlInt  from,
IlInt  to 
)
virtual

Moves a row.

This virtual member function is similar to the moveRow() member function except that it moves only the row in the local row cache.

Parameters
fromThe origin row position.
toThe destination row position.
Returns
IlTrue if successful. If the table (or subclass of the table) defines a mapping with a remote database, the row is also moved in the remote database (if possible).

Reimplemented in IliMemoryTable.

◆ newNamedPropertyManager()

IliTablePropertyManager* IliTable::newNamedPropertyManager ( const char *  name)

Creates and returns a new named property manager.

Returns
A new named property manager.

◆ newPropertyManager()

virtual IliTablePropertyManager* IliTable::newPropertyManager ( )
virtual

Creates and returns a new anonymous property manager.

Returns
A new anonymous property manager for the IliTable object.

◆ raiseError()

virtual void IliTable::raiseError ( const IliErrorMessage msg) const
protectedvirtual

Called each time an error occurs.

Parameters
msgThe error message.

◆ ReadTable()

static IliTable* IliTable::ReadTable ( IlvDisplay disp,
std::istream &  input 
)
static

Constructs and returns an instance of a subclass of IliTable by reading its definition from an input stream.

Parameters
dispThe display.
inputThe input stream.
Returns
The table.

◆ refreshAndLockRow()

virtual IlBoolean IliTable::refreshAndLockRow ( IlInt  rowno)
virtual

Refreshes and lock a row.

If this is a two-tier table, this member function re-reads the row from the remote database. In addition, if the remote database supports it, the remote row is locked so that other users cannot modify or delete it as long as the lock is held. The means by which the lock can be released is not specified by class IliTable. It is left to the discretion of subclasses (see class IliSQLTable).

Parameters
rownoThe row position.
Returns
IlTrue if the row was successfully refreshed and remotely locked. If this is a one-tier table, this member function returns IlTrue without having any side effects.

Reimplemented in IliSQLTable.

◆ refreshRow()

virtual IlBoolean IliTable::refreshRow ( IlInt  rowno)
virtual

Refreshes a row.

If this is a two-tier table, this member function re-reads the row from the remote database.

Parameters
rownoThe row position.
Returns
IlTrue in case of success and IlFalse otherwise. If this is a one-tier table, this member function returns IlTrue without having any side effects.

Reimplemented in IliSQLTable.

◆ releaseBuffer()

void IliTable::releaseBuffer ( IliTableBuffer buff)

Releases a table buffer.

Releases a table buffer that has been obtained with the getBuffer() member function.

Parameters
buffThe table buffer.

◆ removeErrorSink()

void IliTable::removeErrorSink ( IliErrorSink sink)

Removes an error sink from this table.

Here is an example showing how errors can be trapped:

IliTable* table = ...;
IliErrorList errors;
table->addErrorSink(&amp;errors);
if (!table->deleteRow(10)) {
IlvPrint("First error: %s", errors.getErrorAt(0).getMessage());
...
}
table->removeErrorSink(&amp;errors);
Parameters
sinkThe error sink.

◆ removeNamedPropertyManager()

void IliTable::removeNamedPropertyManager ( const char *  name)

Removes a property manager.

Parameters
nameThe property manager name.

◆ removeProperty()

void IliTable::removeProperty ( IlInt  rowno,
IlInt  colno,
const IlvSymbol propName 
)

Removes a property from the part of the table.

This member function accesses the default property manager.

Parameters
rownoThe row position.
colnoThe column position.
propNameThe property name.

◆ rowChanged()

virtual void IliTable::rowChanged ( IlInt  rowno)
protectedvirtual

Called just after the row at position rowno has changed (that is, when one or more values in the row have changed).

If only one value in the row has changed, it is preferable to call the cellChanged() member function instead of rowChanged().

Parameters
rownoThe row position.

◆ rowDeleted()

virtual void IliTable::rowDeleted ( IlInt  rowno)
protectedvirtual

Called just after a row has been removed from the table.

Parameters
rownoThe row position.

◆ rowFetched()

virtual void IliTable::rowFetched ( IlInt  rowno)
protectedvirtual

Called just after a new row has been fetched from a remote database and inserted.

In this case the rowInserted() member function must also be called.

Parameters
rownoThe row position.

◆ rowInserted()

virtual void IliTable::rowInserted ( IlInt  rowno)
protectedvirtual

Called just after a new row has been inserted.

Parameters
rownoThe row position.

◆ rowMoved()

virtual void IliTable::rowMoved ( IlInt  src,
IlInt  dest 
)
protectedvirtual

Called just after a row has moved.

Parameters
srcThe origin row position.
destThe destination row position.

◆ rowToBeChanged()

virtual void IliTable::rowToBeChanged ( IlInt  rowno)
protectedvirtual

Called just before the row is changed.

Parameters
rownoThe row position.

◆ rowToBeDeleted()

virtual void IliTable::rowToBeDeleted ( IlInt  rowno)
protectedvirtual

Called just before a row is removed from the table.

Parameters
rownoThe row position.

◆ select()

virtual IlBoolean IliTable::select ( )
virtual

Reads all rows from a remote database.

If the table (or subclass of the table) defines a mapping with a remote database, this member function clears the local row cache, and queries the database to obtain a new, up-to-date, set of rows.

Returns
IlTrue if successful, and IlFalse otherwise.

Reimplemented in IliSQLTable.

◆ set() [1/2]

IlBoolean IliTable::set ( IlInt  rowno,
IliName  colname,
const IliValue value 
)

Sets a value.

Changes the value in the column named colname of the row positioned at rowno to value.

Parameters
rownoThe row position.
colnameThe name of the column.
valueThe value.
Returns
IlTrue if successful.

◆ set() [2/2]

IlBoolean IliTable::set ( IlInt  rowno,
IlInt  colno,
const IliValue value 
)

Sets a value.

Changes the value in the column positioned at colno of the row positioned at rowno to value. This member function calls the updateRow() member function. Note that if the table is a two-tier table (such as an IliSQLTable object) and if more than one column must be changed at once, calling the set() member function twice (once for each column) does not necessarily have the same effect as using a table buffer, assigning the two columns in the table buffer, and calling the updateRow() member function once with that table buffer.

Parameters
rownoThe row position.
colnoThe column position.
valueThe value.
Returns
IlTrue if successful.

◆ setColumnForeignDataSourceName()

void IliTable::setColumnForeignDataSourceName ( IlInt  colno,
const char *  dsname 
)

Sets the name of the foreign data source for one column.

Parameters
colnoThe column position.
dsnameThe data source name. If it is an empty string, the column has no defined foreign data source.

◆ setColumnForeignDisplayColumn()

void IliTable::setColumnForeignDisplayColumn ( IlInt  colno,
const char *  name 
)

Sets the name of the display column in the foreign table.

The column which is used to find a replacement value for the column. The column name is set to a copy.

Parameters
colnoThe column position.
nameThe name.

◆ setColumnForeignTable()

void IliTable::setColumnForeignTable ( IlInt  colno,
IliTable table 
)

Sets the foreign table of one column.

Parameters
colnoThe column position.
tableThe foreign table.

◆ setColumnForeignValueColumn()

void IliTable::setColumnForeignValueColumn ( IlInt  colno,
const char *  name 
)

Sets the name of the value column in the foreign table.

The column which the value of the column must be matched with, to yield a display value. The column name is set to a copy.

Parameters
colnoThe column position.
nameThe name.

◆ setColumnValueConstrained()

void IliTable::setColumnValueConstrained ( IlInt  colno,
IlBoolean  flag 
)

Specifies that the column is constrained to take its values from the domain of the value column of the foreign table.

Parameters
colnoThe column name.
flagThe constraint flags.

◆ setCompareFunction()

void IliTable::setCompareFunction ( IliCompareFunction  fct,
IlAny  arg = 0 
)

Defines the function and user data that must be used to compare two rows.

Parameters
fctThe function to compare.
argThe user data that can be used to compare two rows.

◆ setGadgetHolder()

void IliTable::setGadgetHolder ( IlvGadgetHolder *  gadHold)

Attaches the table to a gadget holder.

Parameters
gadHoldThe gadget holder. If 0, the table is detached from any gadget holder.

◆ setInCache()

IlBoolean IliTable::setInCache ( IlInt  rowno,
IlInt  colno,
const IliValue value 
)

Sets a value.

This member function is similar to the set() member function except that it calls updateRowInCache() instead of updateRow(). The effect is that if this is a two-tier table, the value is changed in the local row cache only.

Parameters
rownoThe row position.
colnoThe column position.
valueThe value.
Returns
IlTrue if successful.

◆ setModified()

virtual void IliTable::setModified ( IlBoolean  flag)
virtual

Sets the value of the modified property of the table.

Parameters
flagThe modified property of the table.

◆ setParameterColumnName()

void IliTable::setParameterColumnName ( IlInt  paramno,
const char *  colname 
)

Attaches a parameter to one column.

Parameters
paramnoThe parameter position.
colnameThe column name. If 0 or an empty string, the parameter is detached from any column it may be attached to. Value is copied by this member function.

◆ setParameterDataSourceName()

void IliTable::setParameterDataSourceName ( IlInt  paramno,
const char *  dsname 
)

Attaches one parameter to one data source.

Parameters
paramnoThe parameter position.
dsnameThe data source name. If 0 or an empty string, the parameter is detached from a data source. The value is copied.

◆ setParameterMaxLength()

void IliTable::setParameterMaxLength ( IlInt  paramno,
IlInt  maxlen 
)

Sets the maximum length allowed for the parameter.

Parameters
paramnoThe parameter position.
maxlenThe maximum length allowed.

◆ setParameterName()

void IliTable::setParameterName ( IlInt  paramno,
const char *  name 
)

Sets a parameter name.

Parameters
paramnoThe parameter position.
nameThe parameter name.

◆ setParameterType()

void IliTable::setParameterType ( IlInt  paramno,
const IliDatatype type 
)

Sets the type of one parameter.

Parameters
paramnoThe parameter position.
typeThe parameter type.

◆ setParameterValue() [1/2]

void IliTable::setParameterValue ( IliName  paramName,
const IliValue value 
)

Sets the value of one parameter.

Parameters
paramNameThe parameter name.
valueThe value.

◆ setParameterValue() [2/2]

void IliTable::setParameterValue ( IlInt  paramno,
const IliValue value 
)

Sets the value of one parameter.

Parameters
paramnoThe parameter position.
valueThe value.

◆ setProperty()

void IliTable::setProperty ( IlInt  rowno,
IlInt  colno,
const IlvSymbol propName,
const IliValue propVal 
)

Sets a property value to a part of the table.

This member function accesses the default property manager.

Parameters
rownoThe row position.
colnoThe column position.
propNameThe property name.
propValThe value.

◆ setReadOnly()

virtual void IliTable::setReadOnly ( IlBoolean  readOnly)
virtual

Specifies whether the table is read-only.

Parameters
readOnlyThe new read-only state .

Reimplemented in IliMapTable.

◆ setTransactionManager()

void IliTable::setTransactionManager ( IliTransactionManager tm)

Changes the transaction that manages this table.

Parameters
tmThe transaction manager. If it is 0, the table will not be managed by a transaction manager.

◆ setTransactionManagerName()

void IliTable::setTransactionManagerName ( const char *  name)

Changes the transaction that manages this table.

Parameters
nameThe transaction manager name, it is created if it does not already exist.

◆ sortRows()

void IliTable::sortRows ( const IlInt colnoArray,
IlInt  columnsCount,
IlInt  fromRow = 0,
IlInt  toRow = -1,
IliCompareFunction  fct = 0,
IlAny  data = 0 
)

Sorts a set of rows.

Sorts all rows between position fromRow and position toRow. If toRow equals -1, all rows starting at fromRow are sorted. The sorting order is defined by the colnoArray parameter, which designates an array of columnsCount column positions. Each given column is sorted in the ascending or descending order of the values. The global functions IliAscOrder() and IliDescOrder() are used to indicate the type of sort. Example:

// Sorts in the ascending order of column 2
// Sorts in the descending order of column 3
static const IlInt columns[] =
tbl->sortRows(columns, 2);
void sortRows(IlInt fromRow = 0, IlInt toRow = -1,
IlAny userdata = 0);
Parameters
colnoArrayThe column list.
columnsCountThe column count.
fromRowThe first row position.
toRowThe last row position.
fctThe function to compare. It uses to provide its own function to sort the rows.
dataThe user data that can be used to compare two rows.

◆ tableChanged()

virtual void IliTable::tableChanged ( )
protectedvirtual

Called when the IliTable object has undergone a significant number of changes.

It is much more efficient to call this member function after a number of changes, instead of calling one of the specific member functions (described below) after each change.

◆ updateRow()

virtual IlBoolean IliTable::updateRow ( IlInt  rowno,
IliTableBuffer buff 
)
virtual

Updates a row with the values in the table buffer.

Not all the values are used to update the row. Instead the values for which the isModified() member function returns IlTrue, are used.

Note that this member function does not check any of the constraints defined in the schema. If the table (or subclass of the table) defines a mapping with a remote database, the row is also changed in the remote database.

Parameters
rownoThe row position.
buffThe table buffer.
Returns
IlTrue if successful and IlFalse if rowno is out of bounds, or if the row could not be updated.

Reimplemented in IliStringsTable, IliSQLTable, and IliMemoryTable.

◆ updateRowInCache()

virtual IlBoolean IliTable::updateRowInCache ( IlInt  rowno,
IliTableBuffer buff 
)
virtual

Updates a row.

This virtual member function is similar to the updateRow() member function except that it only updates the row in the local row cache if this table is a two-tier table.

Parameters
rownoThe row position.
buffThe table buffer.
Returns
IlTrue if successful and IlFalse if rowno is out of bounds, or if the row could not be updated.

Reimplemented in IliMemoryTable.

◆ write()

virtual void IliTable::write ( IL_STDPREF ostream &  output) const
virtual

Writes the definition of a schema to an output stream in a form suitable to be read back by the stream-based constructor.

Parameters
outputThe output stream.

Reimplemented from IliSchema.

Reimplemented in IliStringsTable, IliMemoryTable, and IliMapTable.

◆ writeTable()

void IliTable::writeTable ( std::ostream &  output) const

Writes the definition of the table to an output stream, in a form suitable to be read back by the ReadTable() static member function.

This member function can write any subclass of IliTable.

Parameters
outputThe output stream.
IliTable::addErrorSink
void addErrorSink(IliErrorSink *sink)
Adds an error sink.
IliDescOrder
IlInt IliDescOrder(IlInt colno)
Table columns can be sorted by ascending or descending order. The IliDescOrder() function takes a col...
IliCompareFunction
int(* IliCompareFunction)(IliTableBuffer *buf1, IliTableBuffer *buf2, const IlInt *columns, IlInt colCount, IlAny userData)
Definition: table.h:133
IlvPrint
void IlvPrint(const char *format,...)
IliTable::sortRows
void sortRows(const IlInt *colnoArray, IlInt columnsCount, IlInt fromRow=0, IlInt toRow=-1, IliCompareFunction fct=0, IlAny data=0)
Sorts a set of rows.
IlInt
long IlInt
IliErrorList
Error Class.
Definition: error.h:407
IliTable::deleteRow
virtual IlBoolean deleteRow(IlInt rowno)
Deletes a row.
IliTable::removeErrorSink
void removeErrorSink(IliErrorSink *sink)
Removes an error sink from this table.
IliTable
Table class.
Definition: table.h:319
IliErrorList::getErrorAt
const IliErrorMessage & getErrorAt(IlInt pos) const
Returns an error message.
IlAny
void * IlAny
IliAscOrder
IlInt IliAscOrder(IlInt colno)
Table columns can be sorted by ascending or descending order. The IliAscOrder() function takes a colu...
IliErrorMessage::getMessage
const char * getMessage() const
Returns the descriptive message of the error.