Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKDatastoreDefIC

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractDatastoreDef
        |
        +--com.ibm.mm.sdk.common.DKDatastoreDefIC
All Implemented Interfaces:
DKConstant, DKConstantIC, dkDatastoreDef, DKMessageId, DKMessageIdIC, java.io.Serializable

public class DKDatastoreDefIC
extends dkAbstractDatastoreDef
implements DKConstantIC, DKMessageIdIC, java.io.Serializable

This class defines methods to access datastore def information in an IC datastore.

See Also:
DKDatastoreIC, Serialized Form

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
DKDatastoreDefIC(dkDatastore ds)
          Constructs a DKDatastoreDefJDBC
 
Method Summary
 void add(dkEntityDef entityObj)
          Adds the given entity object Not supported in this connector.
static java.lang.String addQuotes(java.lang.String identifier)
          Method for replacing single quotes in a literal with a pair of single quotes, making it legal for use in an SQL statement.
 dkEntityDef createEntity()
          Creates a new dkEntityDef and return it.
 void del(dkEntityDef entityObj)
          Deletes the given entity object Not supported in this connector.
 dkEntityDef getEntity(java.lang.String entityName)
          Gets the dkEntityDef object for the given entity name
 dkCollection listEntities()
          Gets a list of entities ffor the associated 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 for the associated datastore
static java.lang.String literal(java.lang.String identifier)
          Method for adding single quotes around a string to make it a legal SQL identifier.
static java.lang.String literal(java.lang.String identifier, boolean noTrim)
          Method for adding single quotes around a string to make it a legal SQL identifier.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractDatastoreDef
clearCache, datastoreAdmin, 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

DKDatastoreDefIC

public DKDatastoreDefIC(dkDatastore ds)
Constructs a DKDatastoreDefJDBC
Parameters:
ds - datastore associated with this datastore definition
Method Detail

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
Overrides:
getEntity in class dkAbstractDatastoreDef
Parameters:
entityName - name of entity to retrieve
Returns:
dkEntityDef object contains data about the given entityName. if no entity with the given name exists, null is returned.

listEntities

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

listEntityNames

public java.lang.String[] listEntityNames()
                                   throws DKException,
                                          java.lang.Exception
Gets a list of entity names for the associated 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. If the entityName does not exist, an empty collection is returned.

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. If the entity does not exist, an empty array is returned.

add

public void add(dkEntityDef entityObj)
         throws DKException,
                java.lang.Exception
Adds the given entity object Not supported in this connector.
Overrides:
add in class dkAbstractDatastoreDef
Parameters:
entityObj - entity object to be added.
Throws:
DKException - if this method is called.

del

public void del(dkEntityDef entityObj)
         throws DKException,
                java.lang.Exception
Deletes the given entity object Not supported in this connector.
Overrides:
del in class dkAbstractDatastoreDef
Parameters:
entityObj - the entity object to be deleted.
Throws:
if - this method is called

literal

public static java.lang.String literal(java.lang.String identifier)
Method for adding single quotes around a string to make it a legal SQL identifier. It also replaces internal single quotes with pairs of quotes as is required for valid SQL. Leading and trailing whitespace is removed before adding the single quotes.
Parameters:
identifier - The string identifier to add single quotes to.
Returns:
the identifier with the single quotes added.

literal

public static java.lang.String literal(java.lang.String identifier,
                                       boolean noTrim)
Method for adding single quotes around a string to make it a legal SQL identifier. It also replaces internal single quotes with pairs of quotes as is required for valid SQL.
Parameters:
identifier - The string identifier to add single quotes to.
noTrim - Determines whether or not leading and trailing whitespace characters are removed.
Returns:
the identifier with the single quotes added.

addQuotes

public static java.lang.String addQuotes(java.lang.String identifier)
Method for replacing single quotes in a literal with a pair of single quotes, making it legal for use in an SQL statement.
Parameters:
identifier - The string identifier to process
Returns:
the identifier with the single quotes doubled.

EIP Java APIs

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