Gadget class. More...
#include <ilviews/dataccess/gadgets/sqldtsrc.h>
Public Member Functions | |
IliSQLDataSource (IlvDisplay *display, const IlvPoint &at, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
The constructor initializes an SQL data source. More... | |
virtual IlvBitmap * | getBitmap () const |
Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access. More... | |
IliSQLTable * | getSQLTable () |
Returns the SQL table of the data source. More... | |
const IliSQLTable * | getSQLTable () const |
Returns the SQL table of the data source. More... | |
void | setSQLTable (IliSQLTable *table, IlBoolean owner=IlTrue) |
Sets the SQL table of the data source. More... | |
Public Member Functions inherited from IliDataSource | |
IliDataSource (IlvDisplay *display, const IlvPoint &at, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
The constructor initializes a data source. More... | |
void | addErrorMessage (const char *msg) |
Forwards an application error message to all the error sinks. More... | |
void | addErrorMessage (const IliErrorMessage &msg) |
Forwards an error message to all the error sinks. More... | |
void | addErrorSink (IliErrorSink *sink) |
Adds an error sink. More... | |
IlBoolean | applyQueryMode (IlBoolean interactive=IlFalse) |
Applies the query that the user specified while in query mode. More... | |
void | applyToFields (IliDataSourceFieldCallback cb, IlAny arg) |
Calls the callback function for each field managed by the data source. More... | |
void | cancel () |
Cancels any user input awaiting validation. More... | |
void | cancelQueryMode () |
Cancels query mode by restoring the original data source table. | |
void | clear () |
Calls the IliTable::clearRows() member function on the table of the data source. More... | |
IlBoolean | deleteCurrentRow () |
Deletes the current row of the data source (as long as the current row is an actual row). More... | |
void | dontDeleteRow () |
Call this member function from the onPrepareDeleteRow() virtual member function, or from the corresponding callback to cancel the row deletion. | |
void | dontValidateRow () |
Call this member function from one of the onValidateRow() , onPrepareInsert() , or onPrepareUpdate() virtual member functions, or from one of their corresponding callbacks. | |
void | enableAutoRowLocking (IlBoolean f) |
Specifies whether auto-row-locking mode is enabled for the data source. More... | |
void | enableAutoSelect (IlBoolean autoSelect) |
Specifies whether auto-select mode is enabled for the data source. More... | |
void | enableInsert (IlBoolean enable) |
Specifies whether insertion is allowed. More... | |
IlInt | getColumnsCount () const |
Returns the number of columns in the table. More... | |
IlInt | getCurrentRow () const |
Returns the position of the current row. More... | |
IlInt | getDeletedRow () const |
Returns the position of the row that is currently being deleted if called from the onDeleteRow() member function, or returns the position of the row that is to be deleted if called from the onPrepareDeleteRow() member function (or from the corresponding callback). More... | |
IliTablePropertyManager * | getEffectiveTablePropertyManager () |
Returns the effective table property manager used by the data source. More... | |
const IliTablePropertyManager * | getEffectiveTablePropertyManager () const |
Returns the effective table property manager used by the data source. More... | |
IliErrorReporter * | getErrorReporter () const |
Returns the error reporter that is used by the reportErrors() member functions. More... | |
IlInt | getFetchedRow () const |
Returns the position of the row that is currently being fetched. More... | |
IlInt | getRowsCount () const |
Returns the number of rows in the table. More... | |
IliTable * | getTable () |
Returns the table of the data source. More... | |
const IliTable * | getTable () const |
Returns the table of the data source. More... | |
const char * | getTablePropertyManagerName () const |
Returns the name of the table property manager used by the data source or 0 if the default table property manager is used. Initially, this property is 0 . More... | |
const IliValue & | getValue (IliName colname) const |
Returns the current value of one column. More... | |
const IliValue & | getValue (IlInt colno) const |
Returns the current value of one column. More... | |
IlBoolean | gotoFirst () |
Changes the current row of the data source to the first row of the table after validating any pending user input. More... | |
IlBoolean | gotoLast () |
Changes the current row of the data source to the insert row, provided insertion is allowed, or to the last row if not. More... | |
IlBoolean | gotoNext () |
Changes the current row of the data source to the next row after validating any pending user input. More... | |
IlBoolean | gotoPrevious () |
Changes the current row of the data source to the previous row (as long as the current row is not the first row). More... | |
IlBoolean | gotoRow (IlInt rowno) |
Changes the current row of the data source to a row. More... | |
IlBoolean | isAutoRowLockingEnabled () const |
Returns IlTrue if the data source automatically calls refreshAndLockRow on the underlying table as soon as an attempt to modify an existing row is made. More... | |
IlBoolean | isAutoSelectEnabled () const |
Returns IlTrue if auto-select mode is enabled for the data source. More... | |
IlBoolean | isCurrentRowNull () const |
Returns IlTrue if all the columns of the current row have a null value. More... | |
IlBoolean | isEditable () const |
Returns IlTrue if the data source is not read-only, and if it is currently positioned on a valid row or on the insert row. More... | |
IlBoolean | isInputModified () const |
Returns IlTrue if the user has edited any of the fields managed by the data source. More... | |
IlBoolean | isInQueryMode () const |
Returns IlTrue if the data source is currently in query mode. More... | |
IlBoolean | isInsertEnabled () const |
Returns IlTrue if new rows can be inserted in the table through the data source. More... | |
IlBoolean | isOnInsertRow () const |
Returns IlTrue if the current row is the insert row. More... | |
IlBoolean | isQueryModeSupported () const |
Returns IlTrue if the query mode is supported. More... | |
IlBoolean | isReadOnly () const |
Returns IlTrue if the data source is read-only. More... | |
IlBoolean | isUsingTableProperties () const |
Returns IlTrue if the data source uses table properties. More... | |
virtual void | onCancelEdits () |
Called just after the current edits have been canceled. More... | |
virtual void | onDeleteRow () |
Called each time a row is about to be deleted from the data source table. More... | |
virtual void | onEnterInsertMode () |
Called when the data source enters insert mode. More... | |
virtual void | onEnterModifiedState () |
Called just after the data-source changes its state from "not-modified" to "modified". More... | |
virtual void | onEnterRow () |
Called whenever the data source enters a new row. More... | |
virtual void | onEnterUpdateMode () |
Called when the data source enters update mode. More... | |
virtual void | onFetchRow () |
Called when the data source table is a two-tier table, and each time a new row is fetched from the remote database and stored in the table cache. More... | |
virtual void | onPrepareDeleteRow () |
Called when the user attempts to delete a row through this data-source or when the deleteCurrentRow() member function is called. More... | |
virtual void | onPrepareInsert () |
Called just before a row is inserted into the data source table. More... | |
virtual void | onPrepareUpdate () |
Called just before a row is updated in the data source table. More... | |
virtual void | onQuitInsertMode () |
Called just after a row has been inserted in the data source table. More... | |
virtual void | onQuitRow () |
Called just before leaving a row. More... | |
virtual void | onQuitUpdateMode () |
Called just after a row has been updated in the data source table. More... | |
virtual void | onValidateRow () |
Called by the validate() member function before actually updating the data source table (for both update and insert rows). More... | |
IlBoolean | refreshAndLockCurrentRow (IlBoolean keepChanges=IlFalse) |
Refreshes and lock current row. More... | |
IlBoolean | refreshCurrentRow (IlBoolean keepChanges=IlFalse) |
Refreshes current row. More... | |
void | removeErrorSink (IliErrorSink *sink) |
Removes an error sink from this data source. More... | |
void | reportErrors (const IliErrorList &errorList) const |
Reports the errors that are contained in an error list. More... | |
IlBoolean | select () |
Calls the IliTable::select() member function on the table of the data source and then moves to the first row of the table. More... | |
void | setErrorReporter (IliErrorReporter *reporter) |
Sets the error reporter. More... | |
virtual void | setGlobalScope (IlBoolean) |
Specifies whether the scope of the name of the data gem is local to the container in which it is located or globally visible. More... | |
void | setReadOnly (IlBoolean only) |
Specifies whether the data source is read-only. More... | |
virtual void | setTable (IliTable *table, IlBoolean owner=IlTrue) |
Sets the table of the data source. More... | |
void | setTablePropertyManagerName (const char *name) |
Sets the table property manager name. More... | |
IlBoolean | setValue (IliName colname, const IliValue &value) |
Sets the data source value of one column. More... | |
IlBoolean | setValue (IlInt colno, const IliValue &value) |
Sets the data source value of one column. More... | |
void | setValueModified (IliName colname, IlBoolean flag) |
Changes the modified attribute of the value of one column. More... | |
void | setValueModified (IlInt colno, IlBoolean flag) |
Sets the modified attribute of a value of one column. More... | |
IlBoolean | startInsert () |
Changes the current row of the data source to the insert row, provided insertion is allowed. More... | |
IlBoolean | switchToQueryMode () |
Switches to query mode. More... | |
void | useTableProperties (IlBoolean flag) |
Enables/Disables use table properties. More... | |
IlBoolean | validate (IlBoolean interactive=IlFalse) |
Validates the current row. More... | |
Public Member Functions inherited from IliDataGem | |
IlBoolean | hasGlobalScope () const |
Indicates the data source scope. More... | |
IlBoolean | isSystemUsage () const |
Indicates the system usage flag. More... | |
virtual void | usedBySystem (IlBoolean usage) |
Specifies if the object is a system object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IliDataSource | |
static IlvSymbol * | CancelEditsSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | DeleteRowSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | EnterInsertModeSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | EnterModifiedStateSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | EnterRowSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | EnterUpdateModeSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | FetchRowSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | PrepareDeleteRowSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | PrepareInsertSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | PrepareUpdateSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | QuitInsertModeSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | QuitRowSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | QuitUpdateModeSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
static IlvSymbol * | ValidateRowSymbol () |
Returns the callback name which is called by the corresponding virtual member function. More... | |
Protected Member Functions inherited from IliDataGem | |
IliDataGem (IlvDisplay *display, const IlvPoint &at, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Initializes a new data gem. More... | |
Gadget class.
Library: dbsqlgad
The IliSQLDataSource
class defines a data source whose table is an SQL table.
IliSQLTable
.IliSQLDataSource::IliSQLDataSource | ( | IlvDisplay * | display, |
const IlvPoint & | at, | ||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
The constructor initializes an SQL data source.
display | The display. |
at | The location. |
thickness | The border thickness. |
palette | The palette. |
|
virtual |
Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access.
Reimplemented from IliDataSource.
IliSQLTable* IliSQLDataSource::getSQLTable | ( | ) |
Returns the SQL table of the data source.
const IliSQLTable* IliSQLDataSource::getSQLTable | ( | ) | const |
Returns the SQL table of the data source.
void IliSQLDataSource::setSQLTable | ( | IliSQLTable * | table, |
IlBoolean | owner = IlTrue |
||
) |
Sets the SQL table of the data source.
table | The SQL table. |
owner | If IlTrue , the data source becomes the owner of the table. |