|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.blueworld.lassopro.LassoDSModule
Base class for any datasource module.
LassoDSModules
are used to manipulate datasources.
LassoDSModules
are looked up by the datasource names they claim to support.
They are instantiated once and used repeatedly by Lasso.
Every LassoDSModule
must implement registerLassoModule
method, and one or more methods with the same signature as DS_METHOD_PROTOTYPE
.
Lasso calls registerLassoModule
once at startup to give this
module a chance to register its datasource(s). LassoDSModule
must then
call registerDSModule
as many times as there are datasources implemented by this module.
Field Summary | |
static int |
ACTION_ADD
Add new record to a database |
static int |
ACTION_CLOSE
Close current database connection |
static int |
ACTION_DB_NAMES
Return the names of all the datasources |
static int |
ACTION_DELETE
Delete database record |
static int |
ACTION_EXISTS
Does the specified datasource exist? |
static int |
ACTION_INFO
Return the column info |
static int |
ACTION_INIT
Datasource is being initialized |
static int |
ACTION_RANDOM
Return random database record |
static int |
ACTION_SCHEMA_NAMES
Return the names of the schemas in the specified datasource |
static int |
ACTION_SEARCH
Perform search on a datasource using specified criteria |
static int |
ACTION_SQL
Only needs to be supported by SQL-based databases |
static int |
ACTION_TABLE_NAMES
Return the names of the tables in the specified datasource |
static int |
ACTION_TERM
Datasource is being terminated |
static int |
ACTION_TICKLE
Sent to the datasource when a -database and -table are specified, but no action (or a -nothing action).
|
static int |
ACTION_UPDATE
Update values in a database record |
static int |
PROTECTION_NONE
This column's values can be updated |
static int |
PROTECTION_READ_ONLY
This column's value is read-only |
static int |
SORT_ASCENDING
Sort records in ascending order ( ASC ) |
static int |
SORT_CUSTOM
Use custom order for ordering this column's values |
static int |
SORT_DESCENDING
Sort records in descending order ( DESC ) |
Fields inherited from interface com.blueworld.lassopro.LassoJavaModule |
ERR_NOERR |
Constructor Summary | |
protected |
LassoDSModule()
|
Method Summary | |
int |
DS_METHOD_PROTOTYPE(LassoCall lasso,
int action,
LassoValue data)
A prototype for all datasource methods registered by registerDSModule .
|
protected void |
registerDSModule(java.lang.String moduleName,
java.lang.String methodName,
int flags,
java.lang.String longName,
java.lang.String description)
Registers this datasource with Lasso Professional 7. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.blueworld.lassopro.LassoJavaModule |
registerLassoModule |
Field Detail |
public static final int ACTION_INIT
public static final int ACTION_TERM
public static final int ACTION_EXISTS
ERR_NOERR
to indicate that it does.
Any other return value means that it doesn't exist.
public static final int ACTION_DB_NAMES
public static final int ACTION_SCHEMA_NAMES
public static final int ACTION_TABLE_NAMES
public static final int ACTION_SEARCH
public static final int ACTION_ADD
public static final int ACTION_UPDATE
public static final int ACTION_DELETE
public static final int ACTION_INFO
public static final int ACTION_SQL
public static final int ACTION_RANDOM
public static final int ACTION_CLOSE
public static final int ACTION_TICKLE
-database
and -table
are specified, but no action (or a -nothing
action).
The database can, perhaps, set or reset its connection to the database. Or, it can do nothing.
public static final int SORT_ASCENDING
ASC
)
public static final int SORT_DESCENDING
DESC
)
public static final int SORT_CUSTOM
public static final int PROTECTION_NONE
public static final int PROTECTION_READ_ONLY
Constructor Detail |
protected LassoDSModule()
Method Detail |
protected void registerDSModule(java.lang.String moduleName, java.lang.String methodName, int flags, java.lang.String longName, java.lang.String description)
moduleName
- the name of your datasource connector, as returned by [Lasso_DatasourceModuleName]
LDML tagmethodName
- the name of your module (class) main entry method. methodName
method should have the same signature as DS_METHOD_PROTOTYPE
flags
- unusedlongName
- unuseddescription
- short description of your datasource connector. Can be null.public int DS_METHOD_PROTOTYPE(LassoCall lasso, int action, LassoValue data)
registerDSModule
.
Since methods are being registered by name, they must exactly match
the value passed in a methodName
parameter of registerDSModule
call.
lasso
- an object to be used for invoking various LassoCall
methodsaction
- one of the database ACTION_
constantsdata
- datasource, host, or database name when action
is one of the following:
ACTION_EXISTS
, ACTION_DB_NAMES
, ACTION_SCHEMA_NAMES
or ACTION_TABLE_NAMES
.
If action
is ACTION_SQL
, the data
member of LassoValue
object
contains the full text of the SQL statement passed to the inline.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |