|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.server.dkAbstractDatastore | +--com.ibm.mm.sdk.server.DKDatastoreIC
The DKDatastoreIC class is the IC implementation of the abstract class dkDatastore. The datastore provides facilities to query and retrieve data from the DataGuide tables
change history
--------------------------------------
2002-01-29 huicao change listDataSources()--don't use *.ini file,
but access db2Datastore.listDataSources()
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantIC |
DK_CM_PARM_LINKS, DK_IC_DSTYPE |
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant |
For details, see the class or interface |
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdIC |
DK_IC_MSG_MSGID_NOT_FOUND |
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId |
For details, see the class or interface |
Constructor Summary | |
DKDatastoreIC()
|
|
DKDatastoreIC(java.lang.String configuration)
Constructs the datastore and initializes the datastore. |
Method Summary | |
void |
addExtension(java.lang.String extensionName,
dkExtension extensionObj)
Adds a new extension object. |
void |
connect(java.lang.String datastore_name,
java.lang.String user_name,
java.lang.String authentication,
java.lang.String connect_string)
Connects to a datastore. |
DKHandle |
connection()
Gets the connection handle for a datastore |
DKDDO |
createDDO(java.lang.String objectType,
int flags)
Creates a new DDO with object type, properties and attributes set for a given backend server. |
dkQuery |
createQuery(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Creates a query object from a query command. |
dkDatastoreDef |
datastoreDef()
Get datastore definition |
java.lang.String |
datastoreName()
Returns the name of the datastore |
java.lang.String |
datastoreType()
Returns the type of the datastore |
java.lang.String |
db2AttrToIC(java.lang.String schema,
java.lang.String table,
java.lang.String column)
Transforms a DB2 column name into a IC attribute name |
DKDDO |
db2ToICDDO(DKDDO db2DDO,
DKQExpr qe)
Converts a DB2 DDO into the appropriate IC DDO format. |
void |
disconnect()
Disconnects to a datastore. |
java.lang.Object |
evaluate(DKCQExpr qe)
Evaluates the query and returns a collection of all objects returned. |
java.lang.Object |
evaluate(dkQuery query)
Evaluates the query and returns a collection of all objects returned. |
java.lang.Object |
evaluate(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Evaluates the query and returns a collection of all objects returned. |
dkResultSetCursor |
execute(DKCQExpr cqe)
Executes the query and returns a result set cursor to access the data. |
dkResultSetCursor |
execute(dkQuery query)
Executes the query and returns a result set cursor to access the data. |
dkResultSetCursor |
execute(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Executes the query and returns a result set cursor to access the data. |
dkResultSetCursor |
executeDB2(java.lang.String command,
short commandLangType,
DKNVPair[] params)
Uses the internal DB2 datastore to execute the command query directly. |
void |
executeWithCallback(DKCQExpr qe,
dkCallback callbackObj)
execute the query with callback function. |
void |
executeWithCallback(dkQuery query,
dkCallback callbackObj)
execute the query with callback function. |
void |
executeWithCallback(java.lang.String command,
short commandLangType,
DKNVPair[] params,
dkCallback callbackObj)
execute the query with callback function. |
dkExtension |
getExtension(java.lang.String extensionName)
Gets the extension object from a given extenstion name. |
dkSchemaMapping |
getMapping(java.lang.String mappingName)
Gets a mapping information from this datastore. |
java.lang.Object |
getOption(int option)
Gets a datastore option. |
java.lang.String |
icAttrToDB2(java.lang.String entityName,
java.lang.String attrName)
Transforms an IC attribute identifier into a DB2 column name |
java.lang.String |
icEntityToDB2(java.lang.String entityName)
Transforms an IC entity identifier into a DB2 table name |
DKQExpr |
ICQueryToDB2(DKQExpr dkq)
Transforms a parametric query to use DB2 identifiers |
boolean |
isConnected()
Checks to see if the datastore is connected. |
java.lang.String[] |
listDataSourceNames()
List the available datastore source names that can be used to connect with. |
dkCollection |
listDataSources()
List the available datastore sources that can be used to connect with. |
dkCollection |
listEntities()
Gets a list of entities from persistent datastore |
java.lang.String[] |
listEntityAttrNames(java.lang.String entityName)
Gets a list of attribute names for a given entity name. |
dkCollection |
listEntityAttrs(java.lang.String entityName)
Gets a list of attributes for a given entity name. |
java.lang.String[] |
listEntityNames()
Gets a list of entity names from persistent datastore |
java.lang.String[] |
listMappingNames()
Gets the list of the registered mappings from this datastore. |
static DKQExpr |
parseParametricQuery(java.lang.String command)
Creates a DKQExpr from a parametric query in text form. |
java.lang.String |
registerMapping(DKNVPair sourceMap)
Registers a mapping definition to this datastore. |
void |
retrieveObject(dkDataObject dkdo)
Retrieves this ddo from this datastore. |
void |
setDataSourceFile(java.lang.String s)
Set the name of the data file to load the data source list from. |
void |
setOption(int option,
java.lang.Object value)
Sets a datastore option. |
void |
unRegisterMapping(java.lang.String mappingName)
Unregisters mapping information from this datastore. |
java.lang.String |
userName()
Returns the name of the user for the database connection. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DKDatastoreIC() throws DKException, java.lang.Exception
public DKDatastoreIC(java.lang.String configuration) throws DKException, java.lang.Exception
Method Detail |
public void connect(java.lang.String datastore_name, java.lang.String user_name, java.lang.String authentication, java.lang.String connect_string) throws DKException, java.lang.Exception
connect
in interface dkDatastore
connect
in class dkAbstractDatastore
datastore_name
- the datastore name used for connectionuser_name
- the user name used for connectionauthentication
- the authentication used for connectionconnect_string
- the connect string used for connection.
This is used to provide additional connection options.public DKHandle connection() throws java.lang.Exception
connection
in interface dkDatastore
connection
in class dkAbstractDatastore
public void disconnect() throws DKException, java.lang.Exception
disconnect
in interface dkDatastore
disconnect
in class dkAbstractDatastore
public boolean isConnected() throws DKException, java.lang.Exception
isConnected
in interface dkDatastore
isConnected
in class dkAbstractDatastore
public java.lang.String userName() throws DKException, java.lang.Exception
userName
in interface dkDatastore
userName
in class dkAbstractDatastore
public java.lang.String datastoreName() throws DKException, java.lang.Exception
datastoreName
in interface dkDatastore
datastoreName
in class dkAbstractDatastore
public java.lang.String datastoreType() throws DKException, java.lang.Exception
datastoreType
in interface dkDatastore
datastoreType
in class dkAbstractDatastore
public dkQuery createQuery(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
DKSQLQuery
object is returned.createQuery
in interface dkDatastore
createQuery
in class dkAbstractDatastore
command
- a query stringcommandLang
- a query typeparams
- additional query option in name/value pairpublic java.lang.Object getOption(int option) throws DKException, java.lang.Exception
getOption
in interface dkDatastore
getOption
in class dkAbstractDatastore
option
- the option identifierpublic void setOption(int option, java.lang.Object value) throws DKException, java.lang.Exception
setOption
in interface dkDatastore
setOption
in class dkAbstractDatastore
option
- the option identifiervalue
- the option valuepublic java.lang.Object evaluate(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
evaluate
in interface dkDatastore
evaluate
in class dkAbstractDatastore
command
- a query stringcommandLang
- a query typeparams
- additional query option in name/value pairexecute( String, short, DKNVPair[] )
public java.lang.Object evaluate(dkQuery query) throws DKException, java.lang.Exception
evaluate
in interface dkDatastore
evaluate
in class dkAbstractDatastore
query
- a query objectexecute( dkQuery )
public java.lang.Object evaluate(DKCQExpr qe) throws DKException, java.lang.Exception
evaluate
in interface dkDatastore
evaluate
in class dkAbstractDatastore
qe
- a common query expression objectexecute( DKCQExpr )
public dkResultSetCursor execute(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
execute
in interface dkDatastore
execute
in class dkAbstractDatastore
command
- a query stringcommandLang
- a query typeparams
- additional query option in name/value pairpublic dkResultSetCursor executeDB2(java.lang.String command, short commandLangType, DKNVPair[] params) throws DKException, java.lang.Exception
executeDB2
in interface dkDatastoreIntIC
command
- a query stringcommandLang
- a query typeparams
- additional query option in name/value pairpublic dkResultSetCursor execute(dkQuery query) throws DKException, java.lang.Exception
execute
in interface dkDatastore
execute
in class dkAbstractDatastore
query
- a query objectpublic dkResultSetCursor execute(DKCQExpr cqe) throws DKException, java.lang.Exception
execute
in interface dkDatastore
execute
in class dkAbstractDatastore
cqe
- a common query expression objectpublic void executeWithCallback(java.lang.String command, short commandLangType, DKNVPair[] params, dkCallback callbackObj) throws DKException, java.lang.Exception
executeWithCallback
in interface dkDatastore
executeWithCallback
in class dkAbstractDatastore
command
- a query stringcommandLang
- a query typeparams
- additional query option in name/value paircallbackObj
- a dkCallback objectpublic void executeWithCallback(dkQuery query, dkCallback callbackObj) throws DKException, java.lang.Exception
executeWithCallback
in interface dkDatastore
executeWithCallback
in class dkAbstractDatastore
query
- a query objectcallbackObj
- a dkCallback objectpublic void executeWithCallback(DKCQExpr qe, dkCallback callbackObj) throws DKException, java.lang.Exception
executeWithCallback
in interface dkDatastore
executeWithCallback
in class dkAbstractDatastore
qe
- a common query expression objectcallbackObj
- a dkCallback objectpublic void retrieveObject(dkDataObject dkdo) throws DKException, java.lang.Exception
retrieveObject
in interface dkDatastore
retrieveObject
in class dkAbstractDatastore
ddo
- the ddo to be retrieved from this datastorepublic java.lang.String db2AttrToIC(java.lang.String schema, java.lang.String table, java.lang.String column) throws DKException, java.lang.Exception
schema
- the DB2 schema, or IC creator, for the object.table
- the DB2 table name that the attribute belongs tocolumn
- the DB2 column name to be converted to a IC
attribute namepublic java.lang.String icAttrToDB2(java.lang.String entityName, java.lang.String attrName) throws DKException, java.lang.Exception
entityName
- the IC entity name that the attribute belongs toattrName
- the IC attribute name to be converted to a DB2
column namepublic java.lang.String icEntityToDB2(java.lang.String entityName) throws DKException, java.lang.Exception
entityName
- the IC entity name to be mapped to a DB2 table namepublic DKDDO db2ToICDDO(DKDDO db2DDO, DKQExpr qe) throws DKException, java.lang.Exception
db2DDO
- The DB2 DDO to convertpublic dkDatastoreDef datastoreDef()
datastoreDef
in interface dkDatastore
datastoreDef
in class dkAbstractDatastore
public dkCollection listEntities() throws DKException, java.lang.Exception
listEntities
in interface dkDatastore
listEntities
in class dkAbstractDatastore
DKException
- if error occurspublic java.lang.String[] listEntityNames() throws DKException, java.lang.Exception
listEntityNames
in interface dkDatastore
listEntityNames
in class dkAbstractDatastore
DKException
- if error occurspublic dkCollection listEntityAttrs(java.lang.String entityName) throws DKException, java.lang.Exception
listEntityAttrs
in interface dkDatastore
listEntityAttrs
in class dkAbstractDatastore
entityName
- name of entity to retrieve attributes forDKException
- if the entity name does not existpublic java.lang.String[] listEntityAttrNames(java.lang.String entityName) throws DKException, java.lang.Exception
listEntityAttrNames
in interface dkDatastore
listEntityAttrNames
in class dkAbstractDatastore
entityName
- name of entity to retrieve attribute names forDKException
- if the entity name does not existpublic java.lang.String registerMapping(DKNVPair sourceMap) throws DKException, java.lang.Exception
registerMapping
in interface dkDatastore
registerMapping
in class dkAbstractDatastore
sourceMap
- source name and mapping, a DKNVPair class with the
following possible values:
unRegisterMapping(java.lang.String)
public void unRegisterMapping(java.lang.String mappingName) throws DKException, java.lang.Exception
unRegisterMapping
in interface dkDatastore
unRegisterMapping
in class dkAbstractDatastore
mappingName
- name of the mapping informationregisterMapping(com.ibm.mm.sdk.common.DKNVPair)
public java.lang.String[] listMappingNames() throws DKException, java.lang.Exception
listMappingNames
in interface dkDatastore
listMappingNames
in class dkAbstractDatastore
registerMapping(com.ibm.mm.sdk.common.DKNVPair)
public dkSchemaMapping getMapping(java.lang.String mappingName) throws DKException, java.lang.Exception
getMapping
in interface dkDatastore
getMapping
in class dkAbstractDatastore
mappingName
- name of the mapping informationregisterMapping(com.ibm.mm.sdk.common.DKNVPair)
public dkExtension getExtension(java.lang.String extensionName) throws DKException, java.lang.Exception
getExtension
in interface dkDatastore
getExtension
in class dkAbstractDatastore
extensionName
- name of the extension object.public void addExtension(java.lang.String extensionName, dkExtension extensionObj) throws DKException, java.lang.Exception
addExtension
in interface dkDatastore
addExtension
in class dkAbstractDatastore
extensionName
- name of new extension objectextensionObj
- the extension object to be setpublic DKDDO createDDO(java.lang.String objectType, int flags) throws DKException, java.lang.Exception
createDDO
in interface dkDatastore
createDDO
in class dkAbstractDatastore
objectType
- the name of the IC Object (Entity) to createflags
- to indicate various options to specify
more detail characteristics of the DDO to create.
For example, it may be a directive to create a
document DDO, a folder, etc.public DKQExpr ICQueryToDB2(DKQExpr dkq) throws DKException, java.lang.Exception
dkq
- The DKQExpr to be translated to DB2 identifiers.public void setDataSourceFile(java.lang.String s)
s
- a String containing the name of the file.public dkCollection listDataSources() throws DKException, java.lang.Exception
listDataSources
in interface dkDatastore
listDataSources
in class dkAbstractDatastore
public java.lang.String[] listDataSourceNames() throws DKException, java.lang.Exception
listDataSourceNames
in interface dkDatastore
listDataSourceNames
in class dkAbstractDatastore
public static DKQExpr parseParametricQuery(java.lang.String command) throws DKException, java.lang.Exception
command
- The parametric query string to be parsed.
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |