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 OADBTestDefDAO

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.OADBTestDefDAO
All Implemented Interfaces:
BaseDAO, TestDefDAO

public class OADBTestDefDAO
extends OADBBaseDAO
implements TestDefDAO

Provides Data Access API implementations for Oracle Applications Database.


Nested Class Summary
protected static class OADBTestDefDAO.DepType
           
protected  class OADBTestDefDAO.PrereqProcessingInfo
           
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.BaseDAO
BaseDAO.DBSessionInfo
 
Field Summary
static java.lang.String SQL_QUERY_DIAG_TEST_DELETE_ALLOWED_FOR_TESTNAME
           
static java.lang.String SQL_QUERY_DIAG_TEST_PARAM_VL_FOR_TESTID
           
 
Fields inherited from class oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.db.OADBBaseDAO
langCode
 
Constructor Summary
OADBTestDefDAO()
           
 
Method Summary
 boolean delete(TestDef pObj)
          Removes the given test definition object from the test repository.
 java.util.List<java.lang.String> fetchAllPrereqs(java.lang.String pTestName)
           
 java.util.List<java.lang.String> fetchAllPrereqs(java.lang.String pTestId, java.util.List<java.lang.String> pTagValueIdList)
           
 java.util.List<java.lang.String> fetchAllPrereqs(java.lang.String pTestId, java.lang.String pTagValueId, java.util.List<java.lang.String> pTagValueIdList)
           
 TestPrereqList fetchAllTestPrereqs(java.lang.String pTagValueId, java.util.List<java.lang.String> pIncludedTestIds)
           
 java.lang.String getInputsetId(java.lang.String pInputsetName, java.lang.String pTestId)
          Returns the GUID for the inpuset with the given name and the given test ID.
 java.lang.String getTestId(java.sql.Connection pCon, java.lang.String pTestName)
           
 java.lang.String getTestId(java.lang.String pTestName)
          Returns the test ID for the given test name.
 java.lang.String[] getTestIds(java.lang.String[] pTestNames)
          Returns the respective test IDs for all the given test names.
protected  void mergePrereqProcInfoList(java.util.ArrayList<OADBTestDefDAO.PrereqProcessingInfo> pPrereqInfoList, TestPrereqList pTestIdsFromTagVal, java.lang.String pid, int pOrder, OADBTestDefDAO.DepType pDepType, boolean pSetProcessedFlag, OADBTestDefDAO.PrereqProcessingInfo pLastPrereq)
           
protected  void mergePrereqsArrayList(java.util.ArrayList<OADBTestDefDAO.PrereqProcessingInfo> pPrereqInfoList, java.util.ArrayList<OADBTestDefDAO.PrereqProcessingInfo> pPrereqInfoListSec, java.lang.String pid, int pOrder, OADBTestDefDAO.PrereqProcessingInfo pLastPrereq)
           
 TestPrereqList queryActivePrereqTests(java.lang.String pSourceTestName)
          Fetches the list of active immediate prerequisite tests for the given test
 TagValueList queryActiveTagValues(java.lang.String pTestName)
          Fetches the list of active diagnostic tag values associated with the given test name
 TestDef[] queryAllTests()
           
 TestInputSetNVList queryInputSetNVList(java.lang.String pInputsetId)
          Queries the list of test input name values for the given input set ID
 TestInputSetList queryInputSets(java.lang.String pTestName)
          Queries the list of test input sets registered in the test repository for the given test.
 TestInputSetList queryInputSetsByTestId(java.lang.String pTestId)
          Queries the list of test input sets registered in the test repository for the given test ID
 TestInputSetList queryInputSetsByTestId(java.lang.String pTestId, java.lang.String pDefaultFlag)
          Queries the list of test input sets registered in the test repository for the given test ID and with the given default flag
 TestDefList queryTestAttributesForTestNames(java.lang.String[] pTestNames)
          Queries some select test level attributes for the given test names.
 TestDef queryTestDefById(java.lang.String pId)
           
 TestDef queryTestDefByName(java.lang.String pName)
           
 TestDef queryTestDefSummaryById(java.lang.String pId)
          Fetches the summary information only for the given test id
 TestDef queryTestDefSummaryByName(java.lang.String pTestName)
          Fetches the summary information only for the given test name
 java.lang.String[] queryTestDisplayNames(java.lang.String[] pTestNames)
          Queries the test display names for the given test names.
 TestParamList queryTestParameters(java.lang.String pId, boolean isInput)
          Fetches the input/output parameter related information from fnd_diag_test_param for the test given test ID and param IO type
 void removeTagAssociationFromTests(java.lang.String pTagName, java.lang.String pTagValue, java.util.List<java.lang.String> pTestNames)
          Deletes the assocation to the given tag name and value from the given tests.
protected  void removeTagFromTests(java.sql.Connection pCon, java.lang.String pTagValueId, java.util.List<java.lang.String> pTests, boolean pOnlyAssoc, boolean pIsListOfTestIDs)
           
protected  void removeTagFromTests(java.sql.Connection pCon, java.lang.String pTagName, java.lang.String pTagValue, java.util.List<java.lang.String> pTestNames, boolean pOnlyAssoc)
           
protected  void removeTagFromTests(java.sql.Connection pCon, java.lang.String pTagName, java.lang.String pTagValue, java.util.List<java.lang.String> pTests, boolean pOnlyAssoc, boolean pIsListOfTestIDs)
           
protected  void save(java.sql.Connection pCon, TestDef pObj)
           
 void save(TestDef pObj)
          Saves the given test definition object to the test repository.
 void save(TestDef pObj, java.util.List<TagValue> pAutoSaveTagValues)
          Saves the given test definition object to the test repository.
 void save(TestInputSet pObj)
          Saves the given test input set to the test repository.
 void saveTagValueAssoc(TagValue pTagValue, java.util.List<java.lang.String> pTestNames)
          Associates the given list of tests with the given tag name and value pair
 
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_TEST_DELETE_ALLOWED_FOR_TESTNAME

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

SQL_QUERY_DIAG_TEST_PARAM_VL_FOR_TESTID

public static final java.lang.String SQL_QUERY_DIAG_TEST_PARAM_VL_FOR_TESTID
See Also:
Constant Field Values
Constructor Detail

OADBTestDefDAO

public OADBTestDefDAO()
Method Detail

save

public void save(TestInputSet pObj)
Description copied from interface: TestDefDAO
Saves the given test input set to the test repository. If an inputset with the given name for the particular test ID, already exists, the input set definition is updated. Otherwise a new input set is created.

Specified by:
save in interface TestDefDAO
Parameters:
pObj - test input set to save.

queryInputSets

public TestInputSetList queryInputSets(java.lang.String pTestName)
Description copied from interface: TestDefDAO
Queries the list of test input sets registered in the test repository for the given test.

Specified by:
queryInputSets in interface TestDefDAO
Parameters:
pTestName - name of the test
Returns:
the list of input sets in the repsotory for the given test name.

queryInputSetsByTestId

public TestInputSetList queryInputSetsByTestId(java.lang.String pTestId)
Description copied from interface: TestDefDAO
Queries the list of test input sets registered in the test repository for the given test ID

Specified by:
queryInputSetsByTestId in interface TestDefDAO
Parameters:
pTestId - ID of the test
Returns:
the list of input sets in the repsotory for the given test name.

queryInputSetsByTestId

public TestInputSetList queryInputSetsByTestId(java.lang.String pTestId,
                                               java.lang.String pDefaultFlag)
Description copied from interface: TestDefDAO
Queries the list of test input sets registered in the test repository for the given test ID and with the given default flag

Specified by:
queryInputSetsByTestId in interface TestDefDAO
Parameters:
pTestId - test ID
pDefaultFlag - default flag
Returns:
the list of input sets in the repository with the given test name and default flag.

queryInputSetNVList

public TestInputSetNVList queryInputSetNVList(java.lang.String pInputsetId)
Description copied from interface: TestDefDAO
Queries the list of test input name values for the given input set ID

Specified by:
queryInputSetNVList in interface TestDefDAO
Parameters:
pInputsetId - input set ID
Returns:
the list of name values for the given input set

saveTagValueAssoc

public void saveTagValueAssoc(TagValue pTagValue,
                              java.util.List<java.lang.String> pTestNames)
Description copied from interface: TestDefDAO
Associates the given list of tests with the given tag name and value pair

Specified by:
saveTagValueAssoc in interface TestDefDAO
Parameters:
pTagValue - tag value to associate
pTestNames - names of the tests to associate with the tag name and value

delete

public boolean delete(TestDef pObj)
               throws java.sql.SQLException
Description copied from interface: TestDefDAO
Removes the given test definition object from the test repository. associated test data is deleted params, inputsets. Tag values and prereqs are unlinked

Specified by:
delete in interface TestDefDAO
Parameters:
pObj - test definition object to save
Throws:
java.sql.SQLException

save

public void save(TestDef pObj)
Description copied from interface: TestDefDAO
Saves the given test definition object to the test repository. If the test already exists, the test definition is updated. Otherwise a new entry is created in the repository.

Specified by:
save in interface TestDefDAO
Parameters:
pObj - test definition object to save

save

public void save(TestDef pObj,
                 java.util.List<TagValue> pAutoSaveTagValues)
Description copied from interface: TestDefDAO
Saves the given test definition object to the test repository. If the test already exists, the test definition is updated. Otherwise a new entry is created in the repository.

Specified by:
save in interface TestDefDAO
Parameters:
pObj - test definition object to save
pAutoSaveTagValues - list of tag values to save automatically unresolved tag values

removeTagAssociationFromTests

public void removeTagAssociationFromTests(java.lang.String pTagName,
                                          java.lang.String pTagValue,
                                          java.util.List<java.lang.String> pTestNames)
Description copied from interface: TestDefDAO
Deletes the assocation to the given tag name and value from the given tests. This involves:

Specified by:
removeTagAssociationFromTests in interface TestDefDAO
Parameters:
pTagName - name of the tag
pTagValue - value of the tag
pTestNames - list of test names from which to remove association to the given tag name value

removeTagFromTests

protected void removeTagFromTests(java.sql.Connection pCon,
                                  java.lang.String pTagName,
                                  java.lang.String pTagValue,
                                  java.util.List<java.lang.String> pTestNames,
                                  boolean pOnlyAssoc)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

removeTagFromTests

protected void removeTagFromTests(java.sql.Connection pCon,
                                  java.lang.String pTagName,
                                  java.lang.String pTagValue,
                                  java.util.List<java.lang.String> pTests,
                                  boolean pOnlyAssoc,
                                  boolean pIsListOfTestIDs)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

removeTagFromTests

protected void removeTagFromTests(java.sql.Connection pCon,
                                  java.lang.String pTagValueId,
                                  java.util.List<java.lang.String> pTests,
                                  boolean pOnlyAssoc,
                                  boolean pIsListOfTestIDs)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

save

protected void save(java.sql.Connection pCon,
                    TestDef pObj)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

queryAllTests

public TestDef[] queryAllTests()
Specified by:
queryAllTests in interface TestDefDAO

queryTestDefSummaryByName

public TestDef queryTestDefSummaryByName(java.lang.String pTestName)
Description copied from interface: TestDefDAO
Fetches the summary information only for the given test name

Specified by:
queryTestDefSummaryByName in interface TestDefDAO
Parameters:
pTestName - name of the test
Returns:
an instance of TestDef with only the summary information populated.

queryTestDefSummaryById

public TestDef queryTestDefSummaryById(java.lang.String pId)
Description copied from interface: TestDefDAO
Fetches the summary information only for the given test id

Specified by:
queryTestDefSummaryById in interface TestDefDAO
Parameters:
pId - id of the test
Returns:
an instance of TestDef with only the summary information populated.

queryTestDefById

public TestDef queryTestDefById(java.lang.String pId)
Specified by:
queryTestDefById in interface TestDefDAO
Parameters:
pId - - i.e. Test ID
Returns:
TestDef object retrieved from Database

queryTestParameters

public TestParamList queryTestParameters(java.lang.String pId,
                                         boolean isInput)
Description copied from interface: TestDefDAO
Fetches the input/output parameter related information from fnd_diag_test_param for the test given test ID and param IO type

Specified by:
queryTestParameters in interface TestDefDAO
Parameters:
pId - - ID for the test
isInput - - the parameter type, true for input, false for output
Returns:
the list of parameters for the given test and the given param type

queryActiveTagValues

public TagValueList queryActiveTagValues(java.lang.String pTestName)
Description copied from interface: TestDefDAO
Fetches the list of active diagnostic tag values associated with the given test name

Specified by:
queryActiveTagValues in interface TestDefDAO
Parameters:
pTestName - name of the test for which to fetch the tag values
Returns:
list of active diagnostic tag values.

queryActivePrereqTests

public TestPrereqList queryActivePrereqTests(java.lang.String pSourceTestName)
Description copied from interface: TestDefDAO
Fetches the list of active immediate prerequisite tests for the given test

Specified by:
queryActivePrereqTests in interface TestDefDAO
Parameters:
pSourceTestName - name of the test for which to fetch prerequisites.
Returns:
the list of immediate prerequisite tests for the given test name.

queryTestDefByName

public TestDef queryTestDefByName(java.lang.String pName)
Specified by:
queryTestDefByName in interface TestDefDAO
Parameters:
pName - - i.e. Test name
Returns:
TestDef object from Database

queryTestDisplayNames

public java.lang.String[] queryTestDisplayNames(java.lang.String[] pTestNames)
Description copied from interface: TestDefDAO
Queries the test display names for the given test names.

Specified by:
queryTestDisplayNames in interface TestDefDAO
Parameters:
pTestNames - input test names for which to fetch the corresponding display names
Returns:
Array of display names corresponding to the given test names

queryTestAttributesForTestNames

public TestDefList queryTestAttributesForTestNames(java.lang.String[] pTestNames)
Description copied from interface: TestDefDAO
Queries some select test level attributes for the given test names. These attributes include test id, test name, test display name, prereq status count, inputs status. Currently does not include metadata.

Specified by:
queryTestAttributesForTestNames in interface TestDefDAO
Parameters:
pTestNames - names of the test to query
Returns:
the list of TestDef objects with the queried attributes populated for the given test names.

getInputsetId

public java.lang.String getInputsetId(java.lang.String pInputsetName,
                                      java.lang.String pTestId)
Description copied from interface: TestDefDAO
Returns the GUID for the inpuset with the given name and the given test ID.

Specified by:
getInputsetId in interface TestDefDAO
Parameters:
pInputsetName - name of the input set
pTestId - test id for the input set
Returns:
inputset ID.

getTestId

public java.lang.String getTestId(java.lang.String pTestName)
Description copied from interface: TestDefDAO
Returns the test ID for the given test name. Returns null if a test with the given name is not found in the test repository.

Specified by:
getTestId in interface TestDefDAO
Parameters:
pTestName - name of the test
Returns:
the ID for the test with the given name

getTestId

public java.lang.String getTestId(java.sql.Connection pCon,
                                  java.lang.String pTestName)

getTestIds

public java.lang.String[] getTestIds(java.lang.String[] pTestNames)
Description copied from interface: TestDefDAO
Returns the respective test IDs for all the given test names. If a test name is not found, then the corresponding index in the returned array is null.

Specified by:
getTestIds in interface TestDefDAO
Parameters:
pTestNames - the list of test names
Returns:
a list of test IDs for the given test names

fetchAllPrereqs

public java.util.List<java.lang.String> fetchAllPrereqs(java.lang.String pTestName)
                                                 throws DiagPrereqCycleException
Specified by:
fetchAllPrereqs in interface TestDefDAO
Parameters:
pTestName - Test Name - a String value
Returns:
list of TestPrereqList object
Throws:
DiagPrereqCycleException - shows cycle found during dependency resolution process.

fetchAllPrereqs

public java.util.List<java.lang.String> fetchAllPrereqs(java.lang.String pTestId,
                                                        java.util.List<java.lang.String> pTagValueIdList)
                                                 throws DiagPrereqCycleException
Specified by:
fetchAllPrereqs in interface TestDefDAO
Parameters:
pTestId - test id
pTagValueIdList - - When value is null, API will not add TagValue prereq list. When value is not null, API will append TagValue prereqs list, discovered while resolving test id dependencies.
Returns:
List of prerequisite testId's, after resolving dependencies.
Throws:
DiagPrereqCycleException - shows cycle found during dependency resolution process.

mergePrereqProcInfoList

protected void mergePrereqProcInfoList(java.util.ArrayList<OADBTestDefDAO.PrereqProcessingInfo> pPrereqInfoList,
                                       TestPrereqList pTestIdsFromTagVal,
                                       java.lang.String pid,
                                       int pOrder,
                                       OADBTestDefDAO.DepType pDepType,
                                       boolean pSetProcessedFlag,
                                       OADBTestDefDAO.PrereqProcessingInfo pLastPrereq)

mergePrereqsArrayList

protected void mergePrereqsArrayList(java.util.ArrayList<OADBTestDefDAO.PrereqProcessingInfo> pPrereqInfoList,
                                     java.util.ArrayList<OADBTestDefDAO.PrereqProcessingInfo> pPrereqInfoListSec,
                                     java.lang.String pid,
                                     int pOrder,
                                     OADBTestDefDAO.PrereqProcessingInfo pLastPrereq)

fetchAllPrereqs

public java.util.List<java.lang.String> fetchAllPrereqs(java.lang.String pTestId,
                                                        java.lang.String pTagValueId,
                                                        java.util.List<java.lang.String> pTagValueIdList)
                                                 throws DiagPrereqCycleException
Specified by:
fetchAllPrereqs in interface TestDefDAO
Parameters:
pTestId - a test id
pTagValueId - a tag value id
pTagValueIdList - - When value is null, API will not add TagValue prereq list. When value is not null, API will append TagValue prereqs list, discovered while resolving test id dependencies
Returns:
List of prerequisite testId's, after resolving dependencies.
Throws:
DiagPrereqCycleException

fetchAllTestPrereqs

public TestPrereqList fetchAllTestPrereqs(java.lang.String pTagValueId,
                                          java.util.List<java.lang.String> pIncludedTestIds)
                                   throws DiagPrereqCycleException
Specified by:
fetchAllTestPrereqs in interface TestDefDAO
Parameters:
pTagValueId - - Tag Value Id
pIncludedTestIds - - fetch all included (and/or child) test ids (order is not important). When value is null, API will not fetch included test ids. When value is not null, API will append included test ids, discovered while resolving tag value id dependencies (both prereqs and includes) for the passed parameter "pTagValueId". However, resultset excludes test ids directly assigned to the parameter itself.
Returns:
- TestPrereqList with run order information - after processing all dependencies
Throws:
DiagPrereqCycleException - shows cycle found during dependency resolution process.

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

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.