Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKDatastoreDefFed

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

public class DKDatastoreDefFed
extends dkAbstractDatastoreDef
implements DKMessageId, DKConstantFed, java.io.Serializable

This class defines methods to access federated datastore 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.DKMessageId
    For details, see the class or interface
 
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
 
Constructor Summary
DKDatastoreDefFed(dkDatastore ds)
          Constructs a new DKDatastoreDefFed object with a given datastore
 
Method Summary
 void add(dkEntityDef entityObj)
          Adds this given federated schema def object to the persistent datastore.
 dkEntityDef createEntity()
          Creates a new dkEntityDef and return it.
 dkDatastoreAdmin datastoreAdmin()
          Gets the reference to dkDatastoreAdmin object
 void del(dkEntityDef entityObj)
          Deletes this given federated schema def object from persistent Federated datastore, i.e., deletes an federated schema from this Federated server.
 dkEntityDef getEntity(java.lang.String entityName)
          Gets the dkEntityDef object for the given entity name from persistent datastore.
 dkSearchTemplate getSearchTemplate(java.lang.String templateName)
          Gets the search template object for the given name from persistent datastore.
 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[] listEntityNames(java.lang.String nativeServerName)
          Gets a list of entity names for the specified native server name
 java.lang.String[] listNativeEntityNames(java.lang.String fedEntityName, java.lang.String serverName)
          Gets a list of native entity names for the specified federate entity name
 java.lang.String[] listParmEntityNames()
          Gets a list of parametric search entity names from persistent datastore
 java.lang.String[] listSchemaMappingNamesByServer(java.lang.String serverName)
          Gets a list of schema mapping names defined for the given server.
 java.lang.String[] listSearchTemplateNames()
          Gets a list of defined search template folders from this Federated server.
 dkCollection listSearchTemplates()
          Gets a list of defined search template folders from this Federated server.
 java.lang.String[] listTextEntityNames()
          Gets a list of text search entity names from persistent datastore
 dkSearchTemplate newSearchTemplate()
          Creates a new search template folder object.
 void retrieve(dkEntityDef entityObj)
          Updates this given federated schema def object to persistent Federated datastore, i.e., updates an federated schema to this Federated server.
 void update(dkEntityDef entityObj)
          Updates this given federated schema def object to persistent Federated datastore, i.e., updates an federated schema to this Federated server.
 
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, retrieveEntity, setDatastore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKDatastoreDefFed

public DKDatastoreDefFed(dkDatastore ds)
                  throws DKException,
                         java.lang.Exception
Constructs a new DKDatastoreDefFed object with a given datastore
Parameters:
ds - reference to the datastore object
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 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

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

listEntityNames

public java.lang.String[] listEntityNames(java.lang.String nativeServerName)
                                   throws DKException,
                                          java.lang.Exception
Gets a list of entity names for the specified native server name
Parameters:
nativeServerName - the native server name
Returns:
an array of entity names
Throws:
DKException - if error occurs

listNativeEntityNames

public java.lang.String[] listNativeEntityNames(java.lang.String fedEntityName,
                                                java.lang.String serverName)
                                         throws DKException,
                                                java.lang.Exception
Gets a list of native entity names for the specified federate entity name
Parameters:
fedEntityName - a federate entity name
serverName - a native server name
Returns:
an array of native entity names
Throws:
DKException - if error occurs

listTextEntityNames

public java.lang.String[] listTextEntityNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of text search entity names from persistent datastore
Returns:
an array of entity names
Throws:
DKException - if error occurs

listParmEntityNames

public java.lang.String[] listParmEntityNames()
                                       throws DKException,
                                              java.lang.Exception
Gets a list of parametric search entity names from persistent datastore
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

listSchemaMappingNamesByServer

public java.lang.String[] listSchemaMappingNamesByServer(java.lang.String serverName)
                                                  throws DKException,
                                                         java.lang.Exception
Gets a list of schema mapping names defined for the given server. This method will access the schema mapping repository to collect the names. Notice that this method is different than the list schema mapping method under dkEntityDef class which would list the registered schema mapping in a given datastore and a given entity.
Parameters:
serverName - the server name
Returns:
an array of schema mapping names defined for this server
Throws:
DKException - if error occurs

newSearchTemplate

public dkSearchTemplate newSearchTemplate()
                                   throws DKException,
                                          java.lang.Exception
Creates a new search template folder object.
Returns:
a DKTemplateQuery object

getSearchTemplate

public dkSearchTemplate getSearchTemplate(java.lang.String templateName)
                                   throws DKException,
                                          java.lang.Exception
Gets the search template object for the given name from persistent datastore.
Parameters:
templateName - name of search template to retrieve
Returns:
dkSearchTemplate object contains data
Throws:
DKException - if the search template name is not exist

listSearchTemplates

public dkCollection listSearchTemplates()
                                 throws DKException,
                                        java.lang.Exception
Gets a list of defined search template folders from this Federated server.
Overrides:
listSearchTemplates in class dkAbstractDatastoreDef
Returns:
a collection of dkSearchTemplate objects
Throws:
DKException - if error occurs in server

listSearchTemplateNames

public java.lang.String[] listSearchTemplateNames()
                                           throws DKException,
                                                  java.lang.Exception
Gets a list of defined search template folders from this Federated server.
Overrides:
listSearchTemplateNames in class dkAbstractDatastoreDef
Returns:
a collection of dkSearchTemplate objects
Throws:
DKException - if error occurs in server

add

public void add(dkEntityDef entityObj)
         throws DKException,
                java.lang.Exception
Adds this given federated schema def object to the persistent datastore. That is, add this group to Federated server.
Overrides:
add in class dkAbstractDatastoreDef
Parameters:
entityObj - an federated schema object to be added.
Throws:
DKException - if entityObj is invalid.

del

public void del(dkEntityDef entityObj)
         throws DKException,
                java.lang.Exception
Deletes this given federated schema def object from persistent Federated datastore, i.e., deletes an federated schema from this Federated server.
Overrides:
del in class dkAbstractDatastoreDef
Parameters:
entityObj - federated schema object to be deleted
Throws:
DKException - if "entityObj" is invalid.

update

public void update(dkEntityDef entityObj)
            throws DKException,
                   java.lang.Exception
Updates this given federated schema def object to persistent Federated datastore, i.e., updates an federated schema to this Federated server.
Parameters:
entityObj - federated schema object to be updated
Throws:
DKException - if "entityObj" is invalid.

retrieve

public void retrieve(dkEntityDef entityObj)
              throws DKException,
                     java.lang.Exception
Updates this given federated schema def object to persistent Federated datastore, i.e., updates an federated schema to this Federated server.
Parameters:
entityObj - federated schema object to be updated
Throws:
DKException - if "entityObj" is invalid.

datastoreAdmin

public dkDatastoreAdmin datastoreAdmin()
                                throws DKException,
                                       java.lang.Exception
Gets the reference to dkDatastoreAdmin object
Overrides:
datastoreAdmin in class dkAbstractDatastoreDef
Returns:
dkDatastoreAdmin object reference

EIP Java APIs

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