com.ibm.gcs.db.component
Class DB2DescriptionAnnotation
java.lang.Object
|
+--com.ibm.gcs.urlpool.Annotation
|
+--com.ibm.gcs.urlpool.DescriptionAnnotation
|
+--com.ibm.gcs.db.component.DB2DescriptionAnnotation
- All Implemented Interfaces:
- DB2Annotation
- public class DB2DescriptionAnnotation
- extends com.ibm.gcs.urlpool.DescriptionAnnotation
- implements DB2Annotation
The DB2DescriptionAnnotation class is the default annotation type
It extends DescrptionAnnotation by implementing methods that
enable it to be written to and read from a database table.
Field Summary |
static java.lang.String |
DATA_KEY
|
Method Summary |
static DB2DescriptionAnnotation |
createAnnotation(com.ibm.gcs.urlpool.Annotation ann)
Constructs a DB2DescriptionAnnotation from any Annotation
object. |
static DB2DescriptionAnnotation |
createAnnotation(java.util.Hashtable h)
Constructs a DB2DescriptionAnnotation from a table of data
loaded from the db2 relation. |
int |
getPersistenceState()
The persistence state may be NOT_LOADED, EXISTS, or
NOT_EXISTS. |
java.lang.String |
getSQLKeys()
Returns a comma separated list of the sql keys. |
java.lang.String |
getSQLValueForKey(java.lang.String key)
Returns a SQL string for the SQL key value or "default" if
no value defined. |
java.lang.String |
getSQLValues()
Returns a comma separated list of the sql values
matching the SQL keys. |
void |
setPersistenceState(int state)
The persistence state may be NOT_LOADED, EXISTS, or
NOT_EXISTS. |
Methods inherited from class com.ibm.gcs.urlpool.DescriptionAnnotation |
getText |
Methods inherited from class com.ibm.gcs.urlpool.Annotation |
getAnnotatee, getAnnotator, setAnnotatee, setAnnotator |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATA_KEY
public static final java.lang.String DATA_KEY
getSQLKeys
public java.lang.String getSQLKeys()
- Returns a comma separated list of the sql keys.
In this case: OTHER
- Specified by:
getSQLKeys
in interface DB2Annotation
- Returns:
- String a comma separated list of the sql keys
getSQLValues
public java.lang.String getSQLValues()
- Returns a comma separated list of the sql values
matching the SQL keys.
In this case: '...text...'
- Specified by:
getSQLValues
in interface DB2Annotation
- Returns:
- String a comma separated list of the sql values
getSQLValueForKey
public java.lang.String getSQLValueForKey(java.lang.String key)
- Returns a SQL string for the SQL key value or "default" if
no value defined.
- Specified by:
getSQLValueForKey
in interface DB2Annotation
getPersistenceState
public int getPersistenceState()
- Description copied from interface:
DB2Annotation
- The persistence state may be NOT_LOADED, EXISTS, or
NOT_EXISTS.
- Specified by:
getPersistenceState
in interface DB2Annotation
- Returns:
- int The state of this annotation object
setPersistenceState
public void setPersistenceState(int state)
- Description copied from interface:
DB2Annotation
- The persistence state may be NOT_LOADED, EXISTS, or
NOT_EXISTS.
- Specified by:
setPersistenceState
in interface DB2Annotation
- Parameters:
int
- The state of this annotation object
createAnnotation
public static DB2DescriptionAnnotation createAnnotation(com.ibm.gcs.urlpool.Annotation ann)
- Constructs a DB2DescriptionAnnotation from any Annotation
object. Gets the text by calling the method
getText()
- Returns:
- DB2DescriptionAnnotation
createAnnotation
public static DB2DescriptionAnnotation createAnnotation(java.util.Hashtable h)
- Constructs a DB2DescriptionAnnotation from a table of data
loaded from the db2 relation. Gets the text from the
column names
OTHER
- Parameters:
h
- Hashtable containing key-value pairs loaded
from row in the database.- Returns:
- DB2EntityAnnotation
(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.