Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


oracle.jbo.common
Interface AccTravDef

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AccTravDefImpl

public interface AccTravDef
extends java.io.Serializable

This interface is used to describe ViewLink accessor traversal in batch mode.

On the batch mode RowSet (oracle.jbo.common.ws.WSRowSet), the user invokes (setAccessorTraversalDef) with an object that implements this interface to specify how ViewLink accessors are to be invoked under batch mode.

The AccTravDef object passed to WSRowSet is referred to as "the root accessor traversal definition." A root AccTravDef has two parts in it. The first is "the level sepcific definition" and the other is "the all-levels definition."

When this accessor traversal definition is processed in MT, as WSRowSet retrieves each row, it checks to see if the row matches one of the AccTravQualifier's in the level specific definition. If so, that qualifier is picked for accessor traversal. If none matches, it checks "the all-levels definition." If a match is found, then that qualifier (from the all-levels def) is used for accessor traversal.

An AccTravQualifier may have one or more AccTravInvoke's. Each AccTravInvoke defines the accessor to traverse. Hence, one AccTravQualifier may produce multiple accessor invocations.

Each AccTravInvoke may have an AccTravDef with it. If so, as the accessor (child) row is retrieved, the AccTravDef contained in the AccTravInvoke is used to produce the next level accessors. I.e., as accessors are traversed, the corresponding next level AccTravDef (in the AccTravInvoke object) is used for traversal in the next level.

As next level AccTravDef is used, all-level definition is passed along, so that if level specific definition is not located, all-level definition is searched for a match.

For example, suppose we have the following AccTravDef on DeptView RowSet:

 (LevelSpecific)
    lev 0: match-all invoke EmpView
       lev 1: match-all invoke DeptView

 (AllLevels)
    empty
 

This means that for each DeptView row, invoke accessor named "EmpView." When the next level row (EmpView row) is processed, invoke accessor named "DeptView."

For another example, suppose we start with the same DeptView RowSet:

 (LevelSpecific)
    empty
 (AllLevels)
    match-by-ViewDef-name: if "mypackage1.DeptView", invoke "EmpView"
    match-by-ViewDef-name: if "mypackage1.EmpView", invoke "DirReports"
 

This means that for every all in any level, check to see if the row came from mypackage1.DeptView. If so, invoke accessor named "EmpView." If it came from mypackage1.EmpView, invoke accessor named "DirReports." This will result in recursive invocation of DirReports on EmpView row, producing an org chart (for each Dept at the top).

Since:
JDeveloper 10.1.2
See Also:
WSRowSet, AccTravQualifier, AccTravInvoke

Field Summary
static int ACC_TRAV_LIMIT_ALL
           
static int ACC_TRAV_LIMIT_UNINITIALIZED
           

 

Method Summary
 AccTravQualifier findMatch(Row row)
          Checks to see if there is an accessor traversal qualifier for the row.
 int getAccTravLimit()
           
 AccTravQualifier[] getAccTravQualifiers()
          Returns an array of accessor traversal qualifiers belonging to this accessor traversal definition.
 AccTravDef getAllLevelsAccTravDef()
          Returns the all-level accessor traversal definition.
 boolean isAllLevels()
          Returns the flag indicating whether this accessor traversal definition is the all-level accessor traversal definition.
 void setAccTravLimit(int limit)
           
 void setAllLevels(boolean b)
          Sets the flag indicating whether this accessor traversal definition.
 void setAllLevelsAccTravDef(AccTravDef allLevelsAccTravDef)
          Sets the all-level accessor traversal definition.

 

Field Detail

ACC_TRAV_LIMIT_ALL

static final int ACC_TRAV_LIMIT_ALL
See Also:
Constant Field Values

ACC_TRAV_LIMIT_UNINITIALIZED

static final int ACC_TRAV_LIMIT_UNINITIALIZED
See Also:
Constant Field Values

Method Detail

getAllLevelsAccTravDef

AccTravDef getAllLevelsAccTravDef()
Returns the all-level accessor traversal definition. The all-level accessor traversal definition should return true when isAllLevels() is invoked.
Returns:
the all-level accessor traversal definition. null if none.

setAllLevelsAccTravDef

void setAllLevelsAccTravDef(AccTravDef allLevelsAccTravDef)
Sets the all-level accessor traversal definition.
Parameters:
allLevelsAccTravDef - the all-level accessor traversal definition. null if none.

isAllLevels

boolean isAllLevels()
Returns the flag indicating whether this accessor traversal definition is the all-level accessor traversal definition. The root AccTravDef should return false. And, only the root AccTravDef should optionally have one and only one all-level AccTravDef--returned by getAllLevelsAccTravDef().
Returns:
the flag indicating whether this accessor traversal definition.

setAllLevels

void setAllLevels(boolean b)
Sets the flag indicating whether this accessor traversal definition. This method is used to mark the all-level AccTravDef's isAllLevels flag to true.
Parameters:
b - the flag value indicating whether this accessor traversal definition.

getAccTravQualifiers

AccTravQualifier[] getAccTravQualifiers()
Returns an array of accessor traversal qualifiers belonging to this accessor traversal definition.
Returns:
an array of accessor traversal qualifiers.

findMatch

AccTravQualifier findMatch(Row row)
Checks to see if there is an accessor traversal qualifier for the row. If so, it returns the first matching AccTravQualifier.
Returns:
the first matching accessor traversal qualifier.

getAccTravLimit

int getAccTravLimit()

setAccTravLimit

void setAccTravLimit(int limit)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


Copyright © 1997, 2012, Oracle. All rights reserved.