com.ibm.websphere.appprofile.accessintent
Interface ReadAheadItem


public interface ReadAheadItem

An instance of this class defines one bean type/relationship to be read. The bean is defined by means of a path expression composed of CMR field names. For example, assume there is a finder which returns Department beans. Within Department, there is a 1-m CMR named "employees" which relates to Employee beans. Within Department, there is also a 1-1 CMR named "manager" which also relates to an Employee bean. Within Employee, there is a CMR named "address" which relates to Address beans.

To cause a Department's employees to be read ahead along with each Department, you need an instance of this class with a path expression of "employees". To read-ahead only employees' addresses, you instead need an instance of this class with a path expression of "employees.address". To read both employees and their addressses, you need both these instances. A path expression must always begin with a CMR name defined in the bean type returned by the finder being executed. Each subsequent CMR name must be defined in the bean type of the preceeding relationship. ReadAheadItems are collected in a ReadAheadHint, which describes the complete set of beans to be read ahead when a given finder is executed. Creation date: (2/1/2002 11:33:58 AM)


Method Summary
 java.lang.String getLastRoleName()
          Return the last role name within our path.
 java.lang.String getNextRoleName()
           
 ReadAheadItem getParentItem()
          Return a ReadAheadItem which is the same as this one but with the final role name removed.
 void resetCursor()
          Reset the cursor on our path expression.
 

Method Detail

getNextRoleName

public java.lang.String getNextRoleName()

resetCursor

public void resetCursor()
Reset the cursor on our path expression. The next call to getNextRoleName() will return the first role name and so on.


getLastRoleName

public java.lang.String getLastRoleName()
Return the last role name within our path.


getParentItem

public ReadAheadItem getParentItem()
Return a ReadAheadItem which is the same as this one but with the final role name removed. For example, if a ReadAheadItem has a path of "a.b.c", that items "parent" item is the one with a path of "a.b". The query generator code requires that, to fetch bean "c", it must also have fetched bean "b". Therefore we can rely that any ReadAheadItem in a given ReadAheadHint also has it's parent item in that same hint, recursively right up to hints which have only a single role name (e.g., "a").



 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.