IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class Nickname

java.lang.Object
  extended bycom.ibm.db2.wrapper.SqlqgBaseClass
      extended bycom.ibm.db2.wrapper.Nickname
Direct Known Subclasses:
FencedNickname, UnfencedNickname

public class Nickname
extends com.ibm.db2.wrapper.SqlqgBaseClass

The Nickname class models collections of data that a data source server manages. Each instance of this class or its subclasses represents a collection of data that is managed by the data source server that the wrapper works with. The Nickname base class implementation maintains the following information:



Usage:
Do not use this class directly, but subclass the FencedGenericNickname class and the UnfencedGenericNickname class.

Since:
IBM DB2 Information Integrator Version 8.2

Method Summary
protected  void destroy()
          Destroys this nickname object and frees any resources associated with it.
 NicknameInfo getInfo()
          Retrieve the nickname information stored in the federated server's system catalog as a result of running DDL statements.
 java.lang.String getLocalName()
          Retrieve the local name for this nickname.
 java.lang.String getLocalSchema()
          Retrieve the local schema for this nickname.
 Server getServer()
          Retrieve the data source server that contains this nickname.
 Wrapper getWrapper()
          Retrieve the wrapper instance that this nickname belongs to.
protected  void initializeMyNickname(NicknameInfo nicknameInfo)
          Perform the necessary nickname initialization.
protected  NicknameInfo verifyMyRegisterNicknameInfo(NicknameInfo nicknameInfo)
          Validate the nickname information that is specified in CREATE NICKNAME statements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

destroy

protected void destroy()
                throws java.lang.Exception
Destroys this nickname object and frees any resources associated with it. The default implementation does nothing. This method is called by the federated server before the nickname object is removed and gives the wrapper a chance to free any resources allocated. If wrapper-specific resources need to be freed, the wrapper writer can implement this method in the wrapper-specific subclass of UnfencedGenericNickname and FencedGenericNickname.

Throws:
java.lang.Exception - if the processing fails.
Since:
IBM DB2 Information Integrator Version 8.2

getInfo

public final NicknameInfo getInfo()
Retrieve the nickname information stored in the federated server's system catalog as a result of running DDL statements.

Returns:
The NicknameInfo instance that contains the nickname information.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
NicknameInfo

getLocalName

public final java.lang.String getLocalName()
Retrieve the local name for this nickname.

Returns:
The local nickname name.
Since:
IBM DB2 Information Integrator Version 8.2

getLocalSchema

public final java.lang.String getLocalSchema()
Retrieve the local schema for this nickname.

Returns:
The local nickname schema.
Since:
IBM DB2 Information Integrator Version 8.2

getServer

public final Server getServer()
Retrieve the data source server that contains this nickname.

Returns:
The data source server.
Since:
IBM DB2 Information Integrator Version 8.2

getWrapper

public final Wrapper getWrapper()
Retrieve the wrapper instance that this nickname belongs to.

Returns:
The wrapper object.
Since:
IBM DB2 Information Integrator Version 8.2

initializeMyNickname

protected void initializeMyNickname(NicknameInfo nicknameInfo)
                             throws java.lang.Exception
Perform the necessary nickname initialization. This method is called when the nickname is created or when the options are changed. The wrapper writer can implement this method in the wrapper-specific nickname subclass to invoke the nickname-specific initialization process.

Parameters:
nicknameInfo - The nickname catalog information.
Throws:
java.lang.Exception - if the initialization process fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
NicknameInfo

verifyMyRegisterNicknameInfo

protected NicknameInfo verifyMyRegisterNicknameInfo(NicknameInfo nicknameInfo)
                                             throws java.lang.Exception
Validate the nickname information that is specified in CREATE NICKNAME statements. By default, this method allows only reserved options and does not return additional information. The wrapper can implement this method in the wrapper-specific nickname subclass. Either the unfenced class or the fenced class must implement this method if the wrapper-specific nickname or column options are supported. Because the verifyMyRegisterNicknameInfo method of the UnfencedGenericNickname class is part of the trusted process space, the method cannot interact with the remote data source. If interaction with the remote data source is necessary to verify the nickname information, the verifyMyRegisterNicknameInfo method of the FencedGenericNickname class must be implemented.

Parameters:
nicknameInfo - The information from the CREATE NICKNAME statement.
Returns:
The information that is added by the nickname object.
Throws:
java.lang.Exception - if the verification process fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
NicknameInfo

IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

(C)Copyright IBM Corp. 2002. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.