Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKDatastoreDefJDBC

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractDatastoreDef
        |
        +--com.ibm.mm.sdk.common.DKDatastoreDefJDBC
All Implemented Interfaces:
DKConstant, DKConstantJDBC, dkDatastoreDef, DKMessageId, DKMessageIdJDBC, java.io.Serializable

public class DKDatastoreDefJDBC
extends dkAbstractDatastoreDef
implements DKConstantJDBC, DKMessageIdJDBC, java.io.Serializable

This class defines methods to access datastore def information in JDBC.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantJDBC
DK_JDBC_AUTOCOMMIT_OFF, DK_JDBC_AUTOCOMMIT_ON, DK_JDBC_DATABASE_DEFAULT, DK_JDBC_DEFAULT_MIMETYPE, DK_JDBC_DSTYPE, DK_JDBC_HSTMT, DK_JDBC_OPT_AUTOCOMMIT_MODE, DK_JDBC_OPT_TXN_ISOLATION, DK_JDBC_PROPERTY_TABLE_NAME, DK_JDBC_PROPERTY_TABLE_SCHEMA, DK_JDBC_READ_COMMITTED, DK_JDBC_READ_UNCOMMITTED, DK_JDBC_REPEATABLE_READ, DK_JDBC_SERIALIZABLE, DK_JDBC_TABLE, DK_JDBC_VIEW
 
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.DKMessageIdJDBC
DK_JDBC_MSG_MSGID_ADD_FAILED, DK_JDBC_MSG_MSGID_DELETE_FAILED, DK_JDBC_MSG_MSGID_NOT_FOUND, DK_JDBC_MSG_MSGID_RETRIEVE_FAILED, DK_JDBC_MSG_MSGID_SQL_ERROR, DK_JDBC_MSG_MSGID_UPDATE_FAILED
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKDatastoreDefJDBC(dkDatastore ds)
          Constructs a DKDatastoreDefJDBC
 
Method Summary
 void add(dkEntityDef entityObj)
          Adds the given entity object to persitent datastore
 dkEntityDef createEntity()
          Creates a new dkEntityDef and return it.
 dkDatastoreAdmin datastoreAdmin()
          Get a datastore administration object for a datastore
 void del(dkEntityDef entityObj)
          Deletes the given entity object from persistent datastore
 dkEntityDef getEntity(java.lang.String entityName)
          Gets the dkEntityDef object for the given entity name from persistent datastore.
 java.lang.String getSchemaName()
          Gets the schema name
 dkCollection listEntities()
          Gets a list of entities from persistent datastore
 dkCollection listEntities(java.lang.String schemaName)
          Gets a list of entities in a given schema from persistent store
 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[] listForeignKeyNames(java.lang.String tableName)
          Gets a list of foreign key names
 java.lang.String[] listPrimaryKeyNames(java.lang.String tableName)
          Gets a list of primary key names
 void setSchemaName(java.lang.String schemaName)
          Sets the schema name
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractDatastoreDef
clearCache, datastoreName, datastoreType, deleteEntity, getDatastore, listEntities, listEntities, listEntityNames, listEntityNames, listSearchableEntities, listSearchableEntities, listSearchableEntities, listSearchableEntityNames, listSearchableEntityNames, listSearchableEntityNames, listSearchTemplateNames, listSearchTemplates, retrieveEntity, setDatastore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKDatastoreDefJDBC

public DKDatastoreDefJDBC(dkDatastore ds)
Constructs a DKDatastoreDefJDBC
Parameters:
ds - datastore
Method Detail

getSchemaName

public java.lang.String getSchemaName()
                               throws java.lang.Exception
Gets the schema name
Returns:
schema name

setSchemaName

public void setSchemaName(java.lang.String schemaName)
                   throws java.lang.Exception
Sets the schema name
Parameters:
schemaName - schema name

createEntity

public dkEntityDef createEntity()
                         throws DKException,
                                java.lang.Exception
Creates a new dkEntityDef and return it.
Overrides:
createEntity in class dkAbstractDatastoreDef
Returns:
a new dkEntityDef

getEntity

public dkEntityDef getEntity(java.lang.String entityName)
                      throws DKException,
                             java.lang.Exception
Gets the dkEntityDef object for the given entity name from persistent datastore.
Overrides:
getEntity in class dkAbstractDatastoreDef
Parameters:
entityName - name of entity to retrieve
Returns:
dkEntityDef object contains data about the given entityName.
Throws:
DKException - if the entity name is not exist

listEntities

public dkCollection listEntities()
                          throws DKException,
                                 java.lang.Exception
Gets a list of entities from persistent datastore
Overrides:
listEntities in class dkAbstractDatastoreDef
Returns:
a collection of entity defs
Throws:
DKException - if error occurs

listEntities

public dkCollection listEntities(java.lang.String schemaName)
                          throws DKException,
                                 java.lang.Exception
Gets a list of entities in a given schema from persistent store
Returns:
a collection of entity defs
Throws:
DKException - if error occurs

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of entity names from persistent datastore
Overrides:
listEntityNames in class dkAbstractDatastoreDef
Returns:
an array of entity names
Throws:
DKException - if error occurs

listEntityAttrs

public dkCollection listEntityAttrs(java.lang.String entityName)
                             throws DKException,
                                    java.lang.Exception
Gets a list of attributes for a given entity name.
Overrides:
listEntityAttrs in class dkAbstractDatastoreDef
Parameters:
entityName - name of entity to retrieve attributes for
Returns:
a dkCollection of dkAttrDef objects
Throws:
DKException - if the entity name does not exist

listEntityAttrNames

public java.lang.String[] listEntityAttrNames(java.lang.String entityName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of attribute names for a given entity name.
Overrides:
listEntityAttrNames in class dkAbstractDatastoreDef
Parameters:
entityName - name of entity to retrieve attribute names for
Returns:
an array of attribute names
Throws:
DKException - if the entity name does not exist

add

public void add(dkEntityDef entityObj)
         throws DKException,
                java.lang.Exception
Adds the given entity object to persitent datastore
Overrides:
add in class dkAbstractDatastoreDef
Parameters:
entityObj - entity object to be added.
Throws:
DKException - if the entity object is invalid or error occurs in the server.

del

public void del(dkEntityDef entityObj)
         throws DKException,
                java.lang.Exception
Deletes the given entity object from persistent datastore
Overrides:
del in class dkAbstractDatastoreDef
Parameters:
entityObj - the entity object to be deleted.
Throws:
DKException - if the entityObj is invalid or does not exist in the server.

datastoreAdmin

public dkDatastoreAdmin datastoreAdmin()
                                throws DKException,
                                       java.lang.Exception
Get a datastore administration object for a datastore
Overrides:
datastoreAdmin in class dkAbstractDatastoreDef
Returns:
a dkDatastoreAdmin object

listPrimaryKeyNames

public java.lang.String[] listPrimaryKeyNames(java.lang.String tableName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of primary key names
Parameters:
tableName - table name
Returns:
an array of primary keys
Throws:
DKException - if error occurs

listForeignKeyNames

public java.lang.String[] listForeignKeyNames(java.lang.String tableName)
                                       throws DKException,
                                              java.lang.Exception
Gets a list of foreign key names
Parameters:
tableName - table name
Returns:
an array of foreign keys
Throws:
DKException - if error occurs

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.