|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.db.component.DB2AnnotationHelper
DB2AnnotationHelper provides methods to produce DB2Annotation related SQL strings for INSERT, UPDATE, and SELECT operations, and methods that call a DB2AnnotationFactory to reconstruct DB2Annotation objects from data retrieved from the database.
By default, uses DefaultDB2AnnotationFactory. The type of factory
may be set with setDB2AnnotationFactory()
.
Field Summary | |
static java.lang.String |
ANN_TYPE_KEY
The name of the column for the annotation type in db annotation table. |
static java.lang.String |
ANNOTATEE_KEY
The name of the column for hte annotatee in db annotation table. |
static java.lang.String |
ANNOTATOR_KEY
The name of column for the annotator in the db annotation table. |
static int |
BYTES_PER_ROW
The number of bytes per row in the db annotation table. |
static boolean |
debug
|
static java.lang.String |
TABLE_NAME
The name of the db annotation table. |
Constructor Summary | |
DB2AnnotationHelper()
|
Method Summary | |
static com.ibm.gcs.urlpool.Annotation[] |
getAnnotationsByAnnotator(com.ibm.gcs.urlpool.URLContainer annotator,
Transaction t)
Returns the annotations for the specified annotator from the parentstable. |
static com.ibm.gcs.urlpool.Annotation[] |
getAnnotationsForAnnotatee(com.ibm.gcs.urlpool.URLContainer annotatee,
Transaction t)
Returns the annotation objects for the specified annotatee from the parentstable. |
static int |
getAnnotationType(java.util.Hashtable h)
Obtains the DB2Annotation type from the type value in the db record. |
static java.lang.String |
getGroupInsertSQL(java.util.Enumeration annEnum)
Constructs the SQL statement to insert a group of annotations into the table |
static java.lang.String |
getInsertSQL(DB2Annotation ann)
Constructs the SQL statement to insert this annotation as a new row in the table |
static java.lang.String |
getSelectSQL(DB2Annotation ann)
Constructs the SQL statement to select this annotation from the table. |
static java.lang.String |
getUpdateSQL(DB2Annotation ann)
Constructs the SQL statement to update this annotation as in the table |
static java.lang.String |
makeHashKey(DB2Annotation ann)
Returns the concatentation of the annotator string followed by the annotatee string. |
static void |
save(DB2Annotation ann,
Transaction t)
Save this annotation by writing it to the database table. |
static void |
saveAll(java.util.Enumeration annEnum,
Transaction t)
Saves an enumeration of annotations into the parentstable. |
static void |
setDB2AnnotationFactory(DB2AnnotationFactory annotationFactory)
Sets the DB2AnnotationFactory. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean debug
public static final int BYTES_PER_ROW
public static final java.lang.String TABLE_NAME
public static final java.lang.String ANNOTATOR_KEY
public static final java.lang.String ANNOTATEE_KEY
public static final java.lang.String ANN_TYPE_KEY
Constructor Detail |
public DB2AnnotationHelper()
Method Detail |
public static void setDB2AnnotationFactory(DB2AnnotationFactory annotationFactory)
annotationFactory
- The annotation factory to be used to
produce DB2Annotation objectspublic static java.lang.String getInsertSQL(DB2Annotation ann)
public static java.lang.String getUpdateSQL(DB2Annotation ann)
public static java.lang.String getSelectSQL(DB2Annotation ann)
public static java.lang.String getGroupInsertSQL(java.util.Enumeration annEnum)
public static void save(DB2Annotation ann, Transaction t) throws TransactionException
Transaction
- t The transaction object with which to
make the database connectionpublic static void saveAll(java.util.Enumeration annEnum, Transaction t) throws TransactionException
public static com.ibm.gcs.urlpool.Annotation[] getAnnotationsByAnnotator(com.ibm.gcs.urlpool.URLContainer annotator, Transaction t) throws TransactionException
annotator
- The annotator or childURLContainert
- The transaction object with which to
make the database connectionpublic static com.ibm.gcs.urlpool.Annotation[] getAnnotationsForAnnotatee(com.ibm.gcs.urlpool.URLContainer annotatee, Transaction t) throws TransactionException
annotatee
- The annotatee or child URLContainert
- The transaction object with which to
make the database connectionpublic static java.lang.String makeHashKey(DB2Annotation ann)
public static int getAnnotationType(java.util.Hashtable h)
h
- The hastable containing the db2 data for an
annotation.
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |