dke.smwp.db
Class DB_smwp_pageref_external

java.lang.Object
  |
  +--dke.smwp.db.DB_smwp_pageref_external

public class DB_smwp_pageref_external
extends java.lang.Object

database handling for table smwp_pageref_external;

Stores information about external links to other page classes which is used for when displaying the serialized xml documents.

 CREATE TABLE SMWP_PAGEREF_EXTERNAL (
   SOURCE_PC         VARCHAR2 (255),
   SOURCE_FC        VARCHAR2 (500),
   SOURCE_FC_ALIAS  VARCHAR2 (30),
   TARGET_PC         VARCHAR2 (255),
   TARGET_PC_ALIAS   VARCHAR2 (30),
   TARGET_FC         VARCHAR2 (500),
   TARGET_FC_ALIAS   VARCHAR2 (30),
   JOIN_BY           VARCHAR2 (500) ) ;
  

Version:
1.0
Author:
Werner Enser

Field Summary
static java.lang.String COLUMN_JOIN_BY
          join statement which uses alias names for framgnet class names
static java.lang.String COLUMN_SOURCE_FC
          column name for source fragment class
static java.lang.String COLUMN_SOURCE_FC_ALIAS
          column alias name for source fragment class
static java.lang.String COLUMN_SOURCE_PC
          column name for source page class
static java.lang.String COLUMN_TARGET_FC
          column name for target fragment class
static java.lang.String COLUMN_TARGET_FC_ALIAS
          column alias name for target fragment class
static java.lang.String COLUMN_TARGET_PC
          column name for target page class
static java.lang.String COLUMN_TARGET_PC_ALIAS
          column alias name for target page class
static java.lang.String TABLENAME_SMWP_PAGEREF_EXTERNAL
          tablename for external page references
 
Constructor Summary
DB_smwp_pageref_external()
          default constructor
 
Method Summary
 void deleteBySource(java.lang.String source_pc_longName)
          deletes all page-references of page class; removes all external links within page class source_pc_longName
 void deleteBySource(java.lang.String source_pc_longName, java.lang.String source_fc_longName)
          deletes page-reference by source fragment class; removes link from source fragment class source_fc_longName within page class source_pc_longName;
 void deleteByTarget(java.lang.String target_pc_longName)
          deletes all page-references by target page class;
 void deleteByTarget(java.lang.String target_pc_longName, java.lang.String target_fc_longName)
          deletes page-reference by target fragment class; removes link to target fragment class target_fc_longName within page class target_pc_longName
private  void doDelete(java.lang.String whereClause)
          FOR INTERNAL USE ONLY; deletes external page references marked by whereClause
private  ExternalPageRef[] doGet(java.lang.String whereClause)
          FOR INTERNAL USE ONLY; gets external page references marked by whereClause
 ExternalPageRef[] get(java.lang.String source_pc_longName)
          gets external page references designated by source page class
 ExternalPageRef[] get(java.lang.String source_pc_longName, java.lang.String source_fc_longName)
          gets external page references designated by source page class and fragment class
 void set(ExternalPageRef pageRef)
          saves page-reference metadata
 void set(java.lang.String source_pc_longName, java.lang.String source_fc_longName, java.lang.String source_fc_aliasName, java.lang.String target_pc_longName, java.lang.String target_pc_aliasName, java.lang.String target_fc_longName, java.lang.String target_fc_aliasName, java.lang.String join_by)
          saves page reference meta-data
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

TABLENAME_SMWP_PAGEREF_EXTERNAL

public static java.lang.String TABLENAME_SMWP_PAGEREF_EXTERNAL
tablename for external page references

COLUMN_SOURCE_PC

public static java.lang.String COLUMN_SOURCE_PC
column name for source page class

COLUMN_SOURCE_FC

public static java.lang.String COLUMN_SOURCE_FC
column name for source fragment class

COLUMN_SOURCE_FC_ALIAS

public static java.lang.String COLUMN_SOURCE_FC_ALIAS
column alias name for source fragment class

COLUMN_TARGET_PC

public static java.lang.String COLUMN_TARGET_PC
column name for target page class

COLUMN_TARGET_PC_ALIAS

public static java.lang.String COLUMN_TARGET_PC_ALIAS
column alias name for target page class

COLUMN_TARGET_FC

public static java.lang.String COLUMN_TARGET_FC
column name for target fragment class

COLUMN_TARGET_FC_ALIAS

public static java.lang.String COLUMN_TARGET_FC_ALIAS
column alias name for target fragment class

COLUMN_JOIN_BY

public static java.lang.String COLUMN_JOIN_BY
join statement which uses alias names for framgnet class names
Constructor Detail

DB_smwp_pageref_external

public DB_smwp_pageref_external()
default constructor
Method Detail

deleteBySource

public void deleteBySource(java.lang.String source_pc_longName)
deletes all page-references of page class; removes all external links within page class source_pc_longName
Parameters:
source_pc_longName - source page class, whose page-references are to be deleted

deleteBySource

public void deleteBySource(java.lang.String source_pc_longName,
                           java.lang.String source_fc_longName)
deletes page-reference by source fragment class; removes link from source fragment class source_fc_longName within page class source_pc_longName;
Parameters:
source_pc_longName - source page class which contains the fragment class, whose page-references are to be deleted
source_fc_longName - source fragment class, whose page-references are to be deleted

deleteByTarget

public void deleteByTarget(java.lang.String target_pc_longName)
deletes all page-references by target page class;
Parameters:
target_pc_longName - target page class, whose page-references are to be deleted

deleteByTarget

public void deleteByTarget(java.lang.String target_pc_longName,
                           java.lang.String target_fc_longName)
deletes page-reference by target fragment class; removes link to target fragment class target_fc_longName within page class target_pc_longName
Parameters:
target_pc_longName - target page class which contains the target fragment class, whose page-references are to be deleted
target_fc_longName - target fragment class, whose page-references are to be deleted

doDelete

private void doDelete(java.lang.String whereClause)
               throws java.sql.SQLException
FOR INTERNAL USE ONLY; deletes external page references marked by whereClause
Parameters:
whereClause - sql statement which marks the page referecnes which are to be deleted
Throws:
java.sql.SQLException - deleting page reference data failed

get

public ExternalPageRef[] get(java.lang.String source_pc_longName)
                      throws java.sql.SQLException
gets external page references designated by source page class
Parameters:
source_pc_longName - source page class for reference
Returns:
page references
Throws:
java.sql.SQLException - failed to fetch data

get

public ExternalPageRef[] get(java.lang.String source_pc_longName,
                             java.lang.String source_fc_longName)
                      throws java.sql.SQLException
gets external page references designated by source page class and fragment class
Parameters:
source_pc_longName - source page class for reference
source_fc_longName - source fragment class for reference
Returns:
page references
Throws:
java.sql.SQLException - failed to fetch data

doGet

private ExternalPageRef[] doGet(java.lang.String whereClause)
                         throws java.sql.SQLException
FOR INTERNAL USE ONLY; gets external page references marked by whereClause
Parameters:
whereClause - sql statement which marks the page references which are to be deleted
Returns:
page references
Throws:
java.sql.SQLException - fetching data failed

set

public void set(ExternalPageRef pageRef)
         throws java.sql.SQLException
saves page-reference metadata
Parameters:
pageRef - page reference
Throws:
java.sql.SQLException - failed to save meta-data

set

public void set(java.lang.String source_pc_longName,
                java.lang.String source_fc_longName,
                java.lang.String source_fc_aliasName,
                java.lang.String target_pc_longName,
                java.lang.String target_pc_aliasName,
                java.lang.String target_fc_longName,
                java.lang.String target_fc_aliasName,
                java.lang.String join_by)
         throws java.sql.SQLException
saves page reference meta-data
Parameters:
source_pc_longName - name of source page class
source_fc_longName - name of source fragment class
source_fc_aliasName - alias of source fragment class
target_pc_longName - name of target page class
target_pc_aliasName - alias of target page class
target_fc_longName - name of target fragment class
target_fc_aliasName - alias of target fragment class
join_by - join clause for page reference
Throws:
java.sql.SQLException - failed to save meta data