Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.db
Class OADBTagDAO

java.lang.Object
  extended by oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.db.OADBBaseDAO
      extended by oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.db.OADBTagDAO
All Implemented Interfaces:
BaseDAO, TagDAO

public class OADBTagDAO
extends OADBBaseDAO
implements TagDAO

Provides implementation of Tag related data access APIs for the Oracle Applications database.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.BaseDAO
BaseDAO.DBSessionInfo
 
Field Summary
static int MAX_ARGS_SQL_PREP_STMT
           
static java.lang.String SQL_QUERY_ALL_DIR_CHILD_TAG_VALUE_IDS_FOR_TAG_NAME
           
static java.lang.String SQL_QUERY_ALL_DIR_DEP_TEST_IDS_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_APPL_TAXONOMY_EXISTS_MODULE_ID
           
static java.lang.String SQL_QUERY_APPL_TAXONOMY_FOR_MODULE_ID
           
static java.lang.String SQL_QUERY_DIAG_ASSOC_DIRCHILD_TESTIDS_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_DIAG_CHILD_TESTIDS_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_DIAG_CHILD_TVI_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_DIAG_PREREQ_TESTIDS_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_DIAG_PREREQS_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_DIAG_PREREQS_FOR_TAG_VALUE_ID_CYCLE
           
static java.lang.String SQL_QUERY_DIAG_TAG_DELETE_ALLOWED
           
static java.lang.String SQL_QUERY_DIAG_TAG_FOR_TAGID
           
static java.lang.String SQL_QUERY_DIAG_TAG_FOR_TAGNAME
           
static java.lang.String SQL_QUERY_DIAG_TAG_UPDATE_ALLOWED
           
static java.lang.String SQL_QUERY_DIAG_TAG_VALUE_EXISTS_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_DIAG_TAG_VALUE_FOR_TAG_VALUE
           
static java.lang.String SQL_QUERY_DIAG_TOP_LEVEL_PREREQS_FOR_TAG_VALUE_ID
           
static java.lang.String SQL_QUERY_TAG_ID_FOR_TAG_NAME
           
static java.lang.String SQL_QUERY_TAXONOMY_HIERARCHY_CHILD_TESTIDS_FOR_MODULE_ID
           
static java.lang.String SQL_QUERY_TAXONOMY_MODULE_IDS_FOR_MODULEKEYS
           
static java.lang.String SQL_QUERY_TAXONOMY_MODULE_IDS_FOR_PRODCODES
           
 
Fields inherited from class oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.db.OADBBaseDAO
langCode
 
Constructor Summary
OADBTagDAO()
           
 
Method Summary
protected  java.lang.String arrayToString(java.lang.String[] pStrArray)
           
 boolean exists(java.lang.String pTagName)
          Checks if this tag exists in the repository.
 boolean exists(java.lang.String pTagName, java.lang.String pTagValue)
          Checks if this tag value exists in the repository.
 boolean existsTagTypeTagValue(java.lang.String tagValueId, java.lang.String tagType)
          Queries the repository to check if a tag value with the given tagValueId and tagType exists.
 TestPrereqList fetchAllTagValueIdPrereqs(java.lang.String pTagValueId)
           
 TestPrereqList fetchAllTagValueIdPrereqs(java.lang.String pTagValueId, boolean pProcessIncludedTests)
           
 java.util.List<java.lang.String> fetchAllTestIdPrereqs(java.lang.String pTagValueId)
           
 TestPrereqList fetchAllTestIdPrereqs(java.lang.String pTagValueId, int pOrder, TestPrereqList pTagValuePrereqList, TestPrereqList pIncludedTagValueList, TestPrereqList pIncludedTestList)
           
 java.util.List<java.lang.String> fetchAllTestIdPrereqs(java.lang.String pTagValueId, java.util.List<java.lang.String> pPrereqTagValueIdList)
           
 java.util.List<java.lang.String> fetchChildTestIds(java.lang.String pTagValueId, boolean pRecurse)
           
 TagValuePrereqList fetchImmediateTagValueIdPrereqs(java.lang.String pTagValueId)
          Returns a list of TagValuePrereq objects that are immediate (top level) prerequisites of the given tag value id.
 Tag fetchTagByName(java.lang.String name)
          Fetches tag definition for a particular tag using the tag name
 TagValue fetchTagValue(java.lang.String tagName, java.lang.String tagValue)
          Fetches the tag value definition for a particular tag value using the given tag name and tag value
 java.lang.String[] getModuleIdsForApps(java.lang.String[] pAppCodes)
           
 java.lang.String[] getModuleIdsForModuleKeys(java.lang.String[] pModuleKeys)
           
 java.lang.String getTagId(java.sql.Connection pCon, java.lang.String pTagName)
           
 java.lang.String getTagId(java.lang.String pTagName)
          Queries the tag ID for the given tag name
 java.lang.String getTagValueId(java.lang.String tagName, java.lang.String tagValue)
          Queries to see if a native diagnostic tag value with the given tagName and tagValue exists in the repository.
 boolean hasTestReferences(java.lang.String pTagName)
          Checks to see if one or more diagnostic tests reference the given tag name.
 boolean hasTestReferences(java.lang.String pTagName, java.lang.String pTagValue)
          Checks to see if one or more diagnostic tests reference the given tag name value pair.
 void remove(java.lang.String pTagName)
          Removes the given tag from the diagnostics repository.
 void remove(java.lang.String pTagName, java.lang.String pTagValue)
          Removes the given tag name and value pair from the diagnostics repository.
 void save(Tag pObj)
          Saves the given tag entity into the diagnostics repository
 void save(TagValue pObj)
          Saves the given tag value entity into the diagnostics repository
 void saveWithinTxn(TagValue pObj, java.sql.Connection pConn)
          Saves the given tag value entity into the diagnostics repository, but allows for this to be done as part of a different transaction.
 
Methods inherited from class oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.db.OADBBaseDAO
close, close, close, createSysGuid, getCLOB, getConnection, getDBSessionInfo, getJdbcBatchSize, getLangCode, getSysDate, getSysDate, getSysGuid, populateWhoColumns, prepareWhoColumns, queryNlsParameters, querySysDate, querySysDate, returnConnection, rollBack, setFetchSize, setSavepoint, setWhoColumnsForInsert, setWhoColumnsForUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.BaseDAO
createSysGuid, getDBSessionInfo, queryNlsParameters, querySysDate, querySysDate
 

Field Detail

SQL_QUERY_DIAG_TAG_VALUE_EXISTS_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_TAG_VALUE_EXISTS_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_TAG_UPDATE_ALLOWED

public static final java.lang.String SQL_QUERY_DIAG_TAG_UPDATE_ALLOWED
See Also:
Constant Field Values

SQL_QUERY_DIAG_TAG_DELETE_ALLOWED

public static final java.lang.String SQL_QUERY_DIAG_TAG_DELETE_ALLOWED
See Also:
Constant Field Values

SQL_QUERY_APPL_TAXONOMY_EXISTS_MODULE_ID

public static final java.lang.String SQL_QUERY_APPL_TAXONOMY_EXISTS_MODULE_ID
See Also:
Constant Field Values

SQL_QUERY_APPL_TAXONOMY_FOR_MODULE_ID

public static final java.lang.String SQL_QUERY_APPL_TAXONOMY_FOR_MODULE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_TAG_VALUE_FOR_TAG_VALUE

public static final java.lang.String SQL_QUERY_DIAG_TAG_VALUE_FOR_TAG_VALUE
See Also:
Constant Field Values

SQL_QUERY_TAG_ID_FOR_TAG_NAME

public static final java.lang.String SQL_QUERY_TAG_ID_FOR_TAG_NAME
See Also:
Constant Field Values

SQL_QUERY_DIAG_TAG_FOR_TAGID

public static final java.lang.String SQL_QUERY_DIAG_TAG_FOR_TAGID
See Also:
Constant Field Values

SQL_QUERY_DIAG_TAG_FOR_TAGNAME

public static final java.lang.String SQL_QUERY_DIAG_TAG_FOR_TAGNAME
See Also:
Constant Field Values

SQL_QUERY_DIAG_PREREQS_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_PREREQS_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_PREREQS_FOR_TAG_VALUE_ID_CYCLE

public static final java.lang.String SQL_QUERY_DIAG_PREREQS_FOR_TAG_VALUE_ID_CYCLE
See Also:
Constant Field Values

SQL_QUERY_DIAG_TOP_LEVEL_PREREQS_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_TOP_LEVEL_PREREQS_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_PREREQ_TESTIDS_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_PREREQ_TESTIDS_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_CHILD_TESTIDS_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_CHILD_TESTIDS_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_CHILD_TVI_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_CHILD_TVI_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_TAXONOMY_HIERARCHY_CHILD_TESTIDS_FOR_MODULE_ID

public static final java.lang.String SQL_QUERY_TAXONOMY_HIERARCHY_CHILD_TESTIDS_FOR_MODULE_ID
See Also:
Constant Field Values

SQL_QUERY_DIAG_ASSOC_DIRCHILD_TESTIDS_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_DIAG_ASSOC_DIRCHILD_TESTIDS_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_ALL_DIR_DEP_TEST_IDS_FOR_TAG_VALUE_ID

public static final java.lang.String SQL_QUERY_ALL_DIR_DEP_TEST_IDS_FOR_TAG_VALUE_ID
See Also:
Constant Field Values

SQL_QUERY_ALL_DIR_CHILD_TAG_VALUE_IDS_FOR_TAG_NAME

public static final java.lang.String SQL_QUERY_ALL_DIR_CHILD_TAG_VALUE_IDS_FOR_TAG_NAME
See Also:
Constant Field Values

SQL_QUERY_TAXONOMY_MODULE_IDS_FOR_PRODCODES

public static final java.lang.String SQL_QUERY_TAXONOMY_MODULE_IDS_FOR_PRODCODES
See Also:
Constant Field Values

SQL_QUERY_TAXONOMY_MODULE_IDS_FOR_MODULEKEYS

public static final java.lang.String SQL_QUERY_TAXONOMY_MODULE_IDS_FOR_MODULEKEYS
See Also:
Constant Field Values

MAX_ARGS_SQL_PREP_STMT

public static final int MAX_ARGS_SQL_PREP_STMT
See Also:
Constant Field Values
Constructor Detail

OADBTagDAO

public OADBTagDAO()
Method Detail

fetchTagByName

public Tag fetchTagByName(java.lang.String name)
Description copied from interface: TagDAO
Fetches tag definition for a particular tag using the tag name

Specified by:
fetchTagByName in interface TagDAO
Parameters:
name -
Returns:

existsTagTypeTagValue

public boolean existsTagTypeTagValue(java.lang.String tagValueId,
                                     java.lang.String tagType)
Description copied from interface: TagDAO
Queries the repository to check if a tag value with the given tagValueId and tagType exists.

Specified by:
existsTagTypeTagValue in interface TagDAO
Parameters:
tagValueId -
tagType - - "T" or "D"
Returns:
boolean - true if Module Id exists when tagType = "T", or Tag Value ID exists when tagType = "D".

getTagId

public java.lang.String getTagId(java.lang.String pTagName)
Description copied from interface: TagDAO
Queries the tag ID for the given tag name

Specified by:
getTagId in interface TagDAO
Parameters:
pTagName - name of the tag to query
Returns:
the tag ID for the given tag name

getTagId

public java.lang.String getTagId(java.sql.Connection pCon,
                                 java.lang.String pTagName)

getTagValueId

public java.lang.String getTagValueId(java.lang.String tagName,
                                      java.lang.String tagValue)
Description copied from interface: TagDAO
Queries to see if a native diagnostic tag value with the given tagName and tagValue exists in the repository. If yes, it returns the corresponding tag value ID. Otherwise returns null.

Specified by:
getTagValueId in interface TagDAO
Parameters:
tagName -
tagValue -
Returns:
Tag Value Id for the tag name / tag value pair - applies to non-Taxonomy tag types.

fetchTagValue

public TagValue fetchTagValue(java.lang.String tagName,
                              java.lang.String tagValue)
Description copied from interface: TagDAO
Fetches the tag value definition for a particular tag value using the given tag name and tag value

Specified by:
fetchTagValue in interface TagDAO
Parameters:
tagName - tag name
tagValue - tag value
Returns:
the populated TagValue object for the given tag name and value

fetchImmediateTagValueIdPrereqs

public TagValuePrereqList fetchImmediateTagValueIdPrereqs(java.lang.String pTagValueId)
Description copied from interface: TagDAO
Returns a list of TagValuePrereq objects that are immediate (top level) prerequisites of the given tag value id.

Specified by:
fetchImmediateTagValueIdPrereqs in interface TagDAO
Parameters:
pTagValueId - tag value id for which to fetch the prereqs
Returns:
list of TagValuePrereq objects that are immediate (top level) prerequisites of the given tag value id.

fetchAllTagValueIdPrereqs

public TestPrereqList fetchAllTagValueIdPrereqs(java.lang.String pTagValueId)
                                         throws DiagPrereqCycleException
Specified by:
fetchAllTagValueIdPrereqs in interface TagDAO
Parameters:
pTagValueId - - Source Tag Value ID for which to find TagValueId Prereq List
Returns:
list of TagValueIdPrereq objects in the expected execution order
Throws:
DiagPrereqCycleException - shows cycle found during dependency resolution process.

fetchAllTestIdPrereqs

public java.util.List<java.lang.String> fetchAllTestIdPrereqs(java.lang.String pTagValueId)
                                                       throws DiagPrereqCycleException
Specified by:
fetchAllTestIdPrereqs in interface TagDAO
Parameters:
pTagValueId - Tag Value Id
Returns:
List of Prereq Test Ids for the given Tag Value ID
Throws:
DiagPrereqCycleException

fetchChildTestIds

public java.util.List<java.lang.String> fetchChildTestIds(java.lang.String pTagValueId,
                                                          boolean pRecurse)
Specified by:
fetchChildTestIds in interface TagDAO
Parameters:
pTagValueId - - Child Tag Value ID's
pRecurse - - when true, prerequites are resolved recursively; otherwise, only straight chid nodes are considered.
Returns:
List of Tag Value IDs as List of Strings - after processing all dependencies

fetchAllTagValueIdPrereqs

public TestPrereqList fetchAllTagValueIdPrereqs(java.lang.String pTagValueId,
                                                boolean pProcessIncludedTests)
                                         throws DiagPrereqCycleException
Specified by:
fetchAllTagValueIdPrereqs in interface TagDAO
Parameters:
pTagValueId - Tag Value Id for which to fetch all Tag Value Prereqs.
pProcessIncludedTests - Flag value true indicates that tag value prereq dependency resolution process will analyze both tag value prereqs and test prereqs.
Returns:
TestPrereqList, which is a List of TagValue Prereqs
Throws:
DiagPrereqCycleException - shows cycle found during dependency resolution process.

getModuleIdsForModuleKeys

public java.lang.String[] getModuleIdsForModuleKeys(java.lang.String[] pModuleKeys)
Specified by:
getModuleIdsForModuleKeys in interface TagDAO
Parameters:
pModuleKeys - - Taxonomy Module Keys - Each Module Key has unique Module Id
Returns:
Module Id's as a String []

getModuleIdsForApps

public java.lang.String[] getModuleIdsForApps(java.lang.String[] pAppCodes)
Specified by:
getModuleIdsForApps in interface TagDAO
Parameters:
pAppCodes - - Taxonomy Module Keys - Each Module Key has unique Module Id
Returns:
Module Id's as a String []

arrayToString

protected java.lang.String arrayToString(java.lang.String[] pStrArray)

fetchAllTestIdPrereqs

public java.util.List<java.lang.String> fetchAllTestIdPrereqs(java.lang.String pTagValueId,
                                                              java.util.List<java.lang.String> pPrereqTagValueIdList)
Specified by:
fetchAllTestIdPrereqs in interface TagDAO
Parameters:
pTagValueId - - Tag Value Id
pPrereqTagValueIdList - - When value is null, API will not add Prereq Tag Value Ids. When value is not null, API will append Prereq Tag Value Id list, discovered while resolving tag value id dependencies, including child tag value ids of the passed parameter "pTagValueId", but excluding the parameter itself.
Returns:
List of Prereq Test Ids - after processing all dependencies

fetchAllTestIdPrereqs

public TestPrereqList fetchAllTestIdPrereqs(java.lang.String pTagValueId,
                                            int pOrder,
                                            TestPrereqList pTagValuePrereqList,
                                            TestPrereqList pIncludedTagValueList,
                                            TestPrereqList pIncludedTestList)
                                     throws DiagPrereqCycleException
Specified by:
fetchAllTestIdPrereqs in interface TagDAO
Parameters:
pTagValueId - - Tag Value Id
pOrder - - Order number of pTagValueId
pTagValuePrereqList - - When value is null, API will not add TagValue type TestPrereqs. When value is not null, API will append TagValue type TestPrereqs, discovered while resolving tag value id dependencies, excluding the parameter - pTagValueId - itself and its child tag value ids.
pIncludedTagValueList - - When not null, add child Tag Values (as TestPrereqList with order info)
pIncludedTestList - - When not null, add child Tests (as TestPrereqList with order info)
Returns:
Test type TestPrereqList - after processing all dependencies
Throws:
DiagPrereqCycleException - shows cycle found during dependency resolution process.

save

public void save(Tag pObj)
Description copied from interface: TagDAO
Saves the given tag entity into the diagnostics repository

Specified by:
save in interface TagDAO
Parameters:
pObj - tag entity to save

save

public void save(TagValue pObj)
Description copied from interface: TagDAO
Saves the given tag value entity into the diagnostics repository

Specified by:
save in interface TagDAO
Parameters:
pObj - tag value entity to save

saveWithinTxn

public void saveWithinTxn(TagValue pObj,
                          java.sql.Connection pConn)
Description copied from interface: TagDAO
Saves the given tag value entity into the diagnostics repository, but allows for this to be done as part of a different transaction.

Specified by:
saveWithinTxn in interface TagDAO
Parameters:
pObj - tag value entity to save
pConn - the connection to use for saving

remove

public void remove(java.lang.String pTagName)
Description copied from interface: TagDAO
Removes the given tag from the diagnostics repository. Removes all tag values that belong to this tag as well.

Specified by:
remove in interface TagDAO
Parameters:
pTagName - name of the tag to remove.

remove

public void remove(java.lang.String pTagName,
                   java.lang.String pTagValue)
Description copied from interface: TagDAO
Removes the given tag name and value pair from the diagnostics repository. Any tests that reference this tag value are also cleaned up so that they no longer reference this tag value after this operation is complete.

Specified by:
remove in interface TagDAO
Parameters:
pTagName - name of the tag
pTagValue - value of the tag

hasTestReferences

public boolean hasTestReferences(java.lang.String pTagName,
                                 java.lang.String pTagValue)
Description copied from interface: TagDAO
Checks to see if one or more diagnostic tests reference the given tag name value pair. References are either associations (i.e. test is tagged using the given name value pair) or prerequisite (i.e. test prereqs the given tag name and value). Returns true if at least one test is found to reference the given tag name and value. Otherwise return false.

Specified by:
hasTestReferences in interface TagDAO
Parameters:
pTagName - name of the tag to check
pTagValue - value of the tag to check
Returns:
Returns true if at least one test is found to reference the given tag name and value. Otherwise return false.

hasTestReferences

public boolean hasTestReferences(java.lang.String pTagName)
Description copied from interface: TagDAO
Checks to see if one or more diagnostic tests reference the given tag name. References are either associations (i.e. test is tagged using the given name) or prerequisite (i.e. test prereqs the given tag name). Returns true if at least one test is found to reference the given tag name. Otherwise return false.

Specified by:
hasTestReferences in interface TagDAO
Parameters:
pTagName - name of the tag to check
Returns:
Returns true if at least one test is found to reference the given tag name. Otherwise return false.

exists

public boolean exists(java.lang.String pTagName)
Description copied from interface: TagDAO
Checks if this tag exists in the repository.

The tag name must be set on this object prior to calling this method.

Specified by:
exists in interface TagDAO
Parameters:
pTagName - name of the tag to check
Returns:
true if tag exists, false otherwise.

exists

public boolean exists(java.lang.String pTagName,
                      java.lang.String pTagValue)
Description copied from interface: TagDAO
Checks if this tag value exists in the repository.

The tag name must be set on this object prior to calling this method.

Specified by:
exists in interface TagDAO
Parameters:
pTagName - name of the tag to check
pTagValue - name of the tag value tag to check
Returns:
true if tag exists, false otherwise.

Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.