Rogue Wave Views
Data Access Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IliSQLDataSource Class Reference

Gadget class. More...

#include <ilviews/dataccess/gadgets/sqldtsrc.h>

Inheritance diagram for IliSQLDataSource:
IliDataSource IliDataGem IlvGadget IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface

Public Member Functions

 IliSQLDataSource (IlvDisplay *display, const IlvPoint &at, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 The constructor initializes an SQL data source. More...
 
virtual IlvBitmapgetBitmap () const
 Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access. More...
 
const IliSQLTablegetSQLTable () const
 Returns the SQL table of the data source. More...
 
IliSQLTablegetSQLTable ()
 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 IliErrorMessage &msg)
 Forwards an error message to all the error sinks. More...
 
void addErrorMessage (const char *msg)
 Forwards an application 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...
 
const IliTablePropertyManagergetEffectiveTablePropertyManager () const
 Returns the effective table property manager used by the data source. More...
 
IliTablePropertyManagergetEffectiveTablePropertyManager ()
 Returns the effective table property manager used by the data source. More...
 
IliErrorReportergetErrorReporter () 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...
 
const IliTablegetTable () const
 Returns the table of the data source. More...
 
IliTablegetTable ()
 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 IliValuegetValue (IlInt colno) const
 Returns the current value of one column. More...
 
const IliValuegetValue (IliName colname) 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 (IlInt colno, const IliValue &value)
 Sets the data source value of one column. More...
 
IlBoolean setValue (IliName colname, const IliValue &value)
 Sets the data source value of one column. More...
 
void setValueModified (IlInt colno, IlBoolean flag)
 Sets the modified attribute of a value of one column. More...
 
void setValueModified (IliName colname, IlBoolean flag)
 Changes the modified attribute of the 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 IlvSymbolCancelEditsSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolDeleteRowSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolEnterInsertModeSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolEnterModifiedStateSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolEnterRowSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolEnterUpdateModeSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolFetchRowSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolPrepareDeleteRowSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolPrepareInsertSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolPrepareUpdateSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolQuitInsertModeSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolQuitRowSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolQuitUpdateModeSymbol ()
 Returns the callback name which is called by the corresponding virtual member function. More...
 
static IlvSymbolValidateRowSymbol ()
 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...
 

Detailed Description

Gadget class.

Library: dbsqlgad

The IliSQLDataSource class defines a data source whose table is an SQL table.

See also
IliSQLTable.

Accessors

Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue(), IlvValueInterface::queryValues(), IlvValueInterface::changeValue(), IlvValueInterface::changeValues(). This class inherits the accessors of its superclass IliDataSource.

Constructor & Destructor Documentation

§ IliSQLDataSource()

IliSQLDataSource::IliSQLDataSource ( IlvDisplay display,
const IlvPoint at,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

The constructor initializes an SQL data source.

Parameters
displayThe display.
atThe location.
thicknessThe border thickness.
paletteThe palette.

Member Function Documentation

§ getBitmap()

virtual IlvBitmap* IliSQLDataSource::getBitmap ( ) const
virtual

Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access.

Returns
The bitmap.

Reimplemented from IliDataSource.

§ getSQLTable() [1/2]

const IliSQLTable* IliSQLDataSource::getSQLTable ( ) const

Returns the SQL table of the data source.

Returns
The SQL table of the data source.

§ getSQLTable() [2/2]

IliSQLTable* IliSQLDataSource::getSQLTable ( )

Returns the SQL table of the data source.

Returns
The SQL table of the data source.

§ setSQLTable()

void IliSQLDataSource::setSQLTable ( IliSQLTable table,
IlBoolean  owner = IlTrue 
)

Sets the SQL table of the data source.

Parameters
tableThe SQL table.
ownerIf IlTrue, the data source becomes the owner of the table.

© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.