com.sun.mdm.index.page
Class TransactionPageAdapter

java.lang.Object
  extended bycom.sun.mdm.index.page.TransactionPageAdapter
All Implemented Interfaces:
PageAdapter, java.io.Serializable

public class TransactionPageAdapter
extends java.lang.Object
implements PageAdapter, java.io.Serializable

Adapter for transaction summaries

See Also:
Serialized Form

Constructor Summary
TransactionPageAdapter(TransactionObject[] transArray, TransactionSearchObject searchObj)
          Creates a new instance of TransactionPageAdapter
 
Method Summary
 void activate()
          When the stateful session bean activates, it will first call this method.
 void close()
          When the stateful session bean is removed, it will first call this method.
 int count()
          Get a count of all the objects in the data source
 boolean hasNext()
          Indicate if there is another object
 void idleTimeOut()
          After the timeout period has expired, this method is called to allow the data source to perform resource conservation activities.
 java.lang.Object next()
          See PageAdapter
 void passivate()
          When the stateful session bean passivates, it will first call this method on the data source.
 java.lang.Object prev()
          See PageAdapter
 void setCurrentPosition(int index)
          See PageAdapter
 void setReadForwardOnly(boolean forwardOnly)
          Set the forward only mode that will clear all the DataPage objects of of a given loaded page i when we start reading/loading the next page i+1.
 void sort(java.util.Comparator c)
          See PageAdapter
 void sortSummary(java.util.Comparator c)
          See PageAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionPageAdapter

public TransactionPageAdapter(TransactionObject[] transArray,
                              TransactionSearchObject searchObj)
                       throws PageException
Creates a new instance of TransactionPageAdapter

Parameters:
transArray - Array of transaction objects
searchObj - Search Object
Throws:
PageException - An error occured.
Method Detail

activate

public void activate()
When the stateful session bean activates, it will first call this method.

Specified by:
activate in interface PageAdapter

close

public void close()
When the stateful session bean is removed, it will first call this method.

Specified by:
close in interface PageAdapter

count

public int count()
          throws PageException
Get a count of all the objects in the data source

Specified by:
count in interface PageAdapter
Returns:
See PageAdapter
Throws:
PageException - See PageAdapter

hasNext

public boolean hasNext()
                throws PageException
Indicate if there is another object

Specified by:
hasNext in interface PageAdapter
Returns:
See PageAdapter
Throws:
PageException - See PageAdapter

idleTimeOut

public void idleTimeOut()
After the timeout period has expired, this method is called to allow the data source to perform resource conservation activities.

Specified by:
idleTimeOut in interface PageAdapter

next

public java.lang.Object next()
                      throws PageException
See PageAdapter

Specified by:
next in interface PageAdapter
Returns:
See PageAdapter
Throws:
PageException - See PageAdapter

passivate

public void passivate()
When the stateful session bean passivates, it will first call this method on the data source. If there are any resources that must be freed prior to passivation, this is the time to do it.

Specified by:
passivate in interface PageAdapter

prev

public java.lang.Object prev()
                      throws PageException
See PageAdapter

Specified by:
prev in interface PageAdapter
Returns:
See PageAdapter
Throws:
PageException - See PageAdapter

setCurrentPosition

public void setCurrentPosition(int index)
                        throws PageException
See PageAdapter

Specified by:
setCurrentPosition in interface PageAdapter
Parameters:
index - See PageAdapter
Throws:
PageException - See PageAdapter

setReadForwardOnly

public void setReadForwardOnly(boolean forwardOnly)
                        throws PageException
Set the forward only mode that will clear all the DataPage objects of of a given loaded page i when we start reading/loading the next page i+1.

Specified by:
setReadForwardOnly in interface PageAdapter
Parameters:
forwardOnly - the
Throws:
PageException - An error occured.

sort

public void sort(java.util.Comparator c)
          throws PageException
See PageAdapter

Specified by:
sort in interface PageAdapter
Parameters:
c - See PageAdapter
Throws:
PageException - Sort array based on comparator

sortSummary

public void sortSummary(java.util.Comparator c)
                 throws PageException
See PageAdapter

Specified by:
sortSummary in interface PageAdapter
Parameters:
c - See PageAdapter
Throws:
PageException - Sort array based on comparator


Sun Microsystems, Inc.