Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKEntityDefFed

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractEntityDef
        |
        +--com.ibm.mm.sdk.common.DKEntityDefFed
All Implemented Interfaces:
DKConstant, DKConstantFed, dkEntityDef, DKMessageId, java.io.Serializable

public class DKEntityDefFed
extends dkAbstractEntityDef
implements java.io.Serializable, DKConstantFed

DKEntityDefFed class defines methods to access federated entity information as well as to:

In this class, there additional methods to access search templates and back-end servers information.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstantFed
    For details, see the class or interface
 
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.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKEntityDefFed()
          Default constructor with no parameter.
DKEntityDefFed(dkDatastore ds)
          Constructs a new dkEntityDefDefault class with owner datastore object
 
Method Summary
 void add()
          Adds this entity definition to the federated data store, that is, make this entity persistent.
 void add(dkAttrDef attrObj)
          Adds the given attribute definition object to the this entity in the persistent store.
 void addAttr(dkAttrDef attrObj)
          Adds the given attribute definition object to this entity in memory only
 void addSchemaMapping(dkSchemaMapping smObj)
          Add another mapping definition of this entity, usually a new mapping to another back-end server.
 dkAttrDef createAttr()
          Creates new dkAttrDef and returns it to caller.
 void del()
          Deletes this entity from the persistent store, e.g.
 void del(dkAttrDef attrObj)
          Deletes the given attribute from this entity in the persistent store.
 void delAttr(dkAttrDef attrObj)
          Deletes the given attribute definition object from this entity in memory only
 dkAttrDef getAttr(java.lang.String attrName)
          Retrieves an attribute object from a given attribute name
 dkServerDef getDataSource(java.lang.String dataSourceName)
          Gets a list of datasource definition objects
 dkSchemaMapping getSchemaMapping(java.lang.String smName)
          Gets a schema mapping object from the given schema mapping name
 java.lang.String[] listAttrNames()
          Gets a list of attribute names.
 dkCollection listAttrs()
          Gets a list of attributes
 java.lang.String[] listDataSourceNames()
          Gets a list of datasource names
 dkCollection listDataSources()
          Gets a list of datasource definition objects
 java.lang.String[] listSchemaMappingNames()
          Gets a list of schema mapping names
 java.lang.String[] listSchemaMappingNamesByServer(java.lang.String serverName)
          Gets schema mapping objects associated with a given server.
 dkCollection listSchemaMappings()
          Gets a collection of all schema mapping classes defined for this entity.
 void removeSchemaMapping(java.lang.String smName)
          Removes a schema mapping from this entity.
 void setDatastore(dkDatastore ds)
          Sets the reference to the owner datastore object
 void update()
          sshi 12-18-2001 update Adds this entity definition to the federated data store, that is, make this entity persistent.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractEntityDef
add, addSubEntity, clearCache, createSubEntity, datastoreName, datastoreType, del, deleteAttr, deleteSubEntity, getDatastore, getDescription, getName, getParentEntityName, getSubEntity, getType, hasSubEntities, isSearchable, isTextSearchable, listSubEntities, listSubEntityNames, removeAttr, removeSubEntity, retrieveAttr, retrieveSubEntity, setDescription, setName, setParentEntityName, setTextSearchable, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKEntityDefFed

public DKEntityDefFed()
Default constructor with no parameter.

DKEntityDefFed

public DKEntityDefFed(dkDatastore ds)
               throws DKException,
                      java.lang.Exception
Constructs a new dkEntityDefDefault class with owner datastore object
Parameters:
ds - reference to owner datastore object
Method Detail

setDatastore

public void setDatastore(dkDatastore ds)
Sets the reference to the owner datastore object
Overrides:
setDatastore in class dkAbstractEntityDef
Following copied from interface: com.ibm.mm.sdk.common.dkEntityDef
Parameters:
ds - datastore

createAttr

public dkAttrDef createAttr()
                     throws DKException,
                            java.lang.Exception
Creates new dkAttrDef and returns it to caller.
Overrides:
createAttr in class dkAbstractEntityDef
Returns:
new dkAttrDef object.
Throws:
DKException - if this entity does not have attribute

getAttr

public dkAttrDef getAttr(java.lang.String attrName)
                  throws DKException,
                         java.lang.Exception
Retrieves an attribute object from a given attribute name
Overrides:
getAttr in class dkAbstractEntityDef
Parameters:
attrName - name of attribute to be retrieved
Returns:
an attribute object
Throws:
DKException - if the attribute name is not exist

listAttrs

public dkCollection listAttrs()
                       throws DKException,
                              java.lang.Exception
Gets a list of attributes
Overrides:
listAttrs in class dkAbstractEntityDef
Returns:
a dkCollection of dkAttrDef's
Throws:
DKException - if error occurs

listAttrNames

public java.lang.String[] listAttrNames()
                                 throws DKException
Gets a list of attribute names.
Overrides:
listAttrNames in class dkAbstractEntityDef
Returns:
an array of attribute names
Throws:
DKException - if error occurs

add

public void add()
         throws DKException,
                java.lang.Exception
Adds this entity definition to the federated data store, that is, make this entity persistent.
Overrides:
add in class dkAbstractEntityDef
Throws:
DKException - when there is error from the back-end server

update

public void update()
            throws DKException,
                   java.lang.Exception
sshi 12-18-2001 update Adds this entity definition to the federated data store, that is, make this entity persistent.
Throws:
DKException - when there is error from the back-end server

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes this entity from the persistent store, e.g. drop table. The in-memory copy is not changed.
Overrides:
del in class dkAbstractEntityDef
Throws:
DKException - when there is error

add

public void add(dkAttrDef attrObj)
         throws DKException,
                java.lang.Exception
Adds the given attribute definition object to the this entity in the persistent store.
Overrides:
add in class dkAbstractEntityDef
Parameters:
attrObj - an attribute object to be added to this entity object
Throws:
DKException - if there is error in datastore server

del

public void del(dkAttrDef attrObj)
         throws DKException,
                java.lang.Exception
Deletes the given attribute from this entity in the persistent store.
Overrides:
del in class dkAbstractEntityDef
Parameters:
attrObj - an attribute object to be deleted from this entity object
Throws:
DKException - if the error occurs in datastore

addAttr

public void addAttr(dkAttrDef attrObj)
Adds the given attribute definition object to this entity in memory only
Overrides:
addAttr in class dkAbstractEntityDef
Parameters:
attrObj - an attribute object to be added to this entity object

delAttr

public void delAttr(dkAttrDef attrObj)
Deletes the given attribute definition object from this entity in memory only
Parameters:
attrObj - an attribute object to be added to this entity object

addSchemaMapping

public void addSchemaMapping(dkSchemaMapping smObj)
                      throws DKException,
                             java.lang.Exception
Add another mapping definition of this entity, usually a new mapping to another back-end server.
Parameters:
smObj - a schema mapping definition object, dkSchemaMapping.

removeSchemaMapping

public void removeSchemaMapping(java.lang.String smName)
                         throws DKException,
                                java.lang.Exception
Removes a schema mapping from this entity.
Parameters:
smName - name of the schema mapping to be removed.

getSchemaMapping

public dkSchemaMapping getSchemaMapping(java.lang.String smName)
                                 throws DKException,
                                        java.lang.Exception
Gets a schema mapping object from the given schema mapping name
Parameters:
smName - name of the schema mapping object to retrieve
Returns:
schema mapping object

listSchemaMappingNamesByServer

public java.lang.String[] listSchemaMappingNamesByServer(java.lang.String serverName)
                                                  throws DKException
Gets schema mapping objects associated with a given server.
Parameters:
serverName - server name
Returns:
schema mapping object.

listSchemaMappings

public dkCollection listSchemaMappings()
                                throws DKException,
                                       java.lang.Exception
Gets a collection of all schema mapping classes defined for this entity.
Returns:
a collection of schema mapping objects

listSchemaMappingNames

public java.lang.String[] listSchemaMappingNames()
                                          throws DKException
Gets a list of schema mapping names
Returns:
an array of schema mapping names

getDataSource

public dkServerDef getDataSource(java.lang.String dataSourceName)
                          throws DKException,
                                 java.lang.Exception
Gets a list of datasource definition objects
Returns:
a collection of datasource definition objects
Throws:
DKException - if dataSourceName is not yet defined

listDataSources

public dkCollection listDataSources()
                             throws DKException,
                                    java.lang.Exception
Gets a list of datasource definition objects
Returns:
a collection of datasource definition objects
Throws:
DKException - if error occurs in server

listDataSourceNames

public java.lang.String[] listDataSourceNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of datasource names
Returns:
an array of datasource names
Throws:
DKException - if error occurs when retrieving datasource names

EIP Java APIs

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