org.apache.oodt.cas.workflow.instrepo
Class AbstractPaginatibleInstanceRepository

java.lang.Object
  extended by org.apache.oodt.cas.workflow.instrepo.AbstractPaginatibleInstanceRepository
All Implemented Interfaces:
WorkflowInstanceRepository, Pagination
Direct Known Subclasses:
DataSourceWorkflowInstanceRepository, LuceneWorkflowInstanceRepository, MemoryWorkflowInstanceRepository

public abstract class AbstractPaginatibleInstanceRepository
extends Object
implements WorkflowInstanceRepository

Version:
$Revision$

Describe your class here

.
Author:
mattmann

Field Summary
protected  int pageSize
           
 
Fields inherited from interface org.apache.oodt.cas.workflow.instrepo.WorkflowInstanceRepository
X_POINT_ID
 
Constructor Summary
AbstractPaginatibleInstanceRepository()
           
 
Method Summary
 WorkflowInstancePage getFirstPage()
           
 WorkflowInstancePage getLastPage()
           
 WorkflowInstancePage getNextPage(WorkflowInstancePage currentPage)
           
 WorkflowInstancePage getPagedWorkflows(int pageNum)
          Gets the WorkflowInstancePage identified by its pageNum and associated status parameters.
 WorkflowInstancePage getPagedWorkflows(int pageNum, String status)
          Gets the WorkflowInstancePage identified by its pageNum and associated status parameters.
 WorkflowInstancePage getPrevPage(WorkflowInstancePage currentPage)
           
protected  List paginateWorkflows(int pageNum)
           
protected abstract  List paginateWorkflows(int pageNum, String status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.oodt.cas.workflow.instrepo.WorkflowInstanceRepository
addWorkflowInstance, getNumWorkflowInstances, getNumWorkflowInstancesByStatus, getWorkflowInstanceById, getWorkflowInstances, getWorkflowInstancesByStatus, removeWorkflowInstance, updateWorkflowInstance
 

Field Detail

pageSize

protected int pageSize
Constructor Detail

AbstractPaginatibleInstanceRepository

public AbstractPaginatibleInstanceRepository()
Method Detail

getFirstPage

public WorkflowInstancePage getFirstPage()
Specified by:
getFirstPage in interface Pagination
Returns:
The first page of products for a particular ProductType.

getLastPage

public WorkflowInstancePage getLastPage()
Specified by:
getLastPage in interface Pagination
Returns:
The last page of products for a particular ProductType.

getNextPage

public WorkflowInstancePage getNextPage(WorkflowInstancePage currentPage)
Specified by:
getNextPage in interface Pagination
Parameters:
currentPage - The current page that tells the function what the next page to obtain is.
Returns:
The next page in the ProductType product list, given the currentPage.

getPrevPage

public WorkflowInstancePage getPrevPage(WorkflowInstancePage currentPage)
Specified by:
getPrevPage in interface Pagination
Parameters:
currentPage - The currentPage that tells the function what the previous page to obtain is.
Returns:
The previous page in the ProductType product list, given the currentPage.

getPagedWorkflows

public WorkflowInstancePage getPagedWorkflows(int pageNum)
                                       throws InstanceRepositoryException
Description copied from interface: Pagination
Gets the WorkflowInstancePage identified by its pageNum and associated status parameters.

Specified by:
getPagedWorkflows in interface Pagination
Parameters:
pageNum - The WorkflowInstancePage number to get.
Returns:
The WorkflowInstancePage with the given status, and page number.
Throws:
InstanceRepositoryException - If any error occurs.

getPagedWorkflows

public WorkflowInstancePage getPagedWorkflows(int pageNum,
                                              String status)
                                       throws InstanceRepositoryException
Description copied from interface: Pagination
Gets the WorkflowInstancePage identified by its pageNum and associated status parameters.

Specified by:
getPagedWorkflows in interface Pagination
Parameters:
pageNum - The WorkflowInstancePage number to get.
status - Identifies which WorkflowInstance set to paginate, e.g., only WorkflowInstances with a given status.
Returns:
The WorkflowInstancePage with the given status, and page number.
Throws:
InstanceRepositoryException - If any error occurs.

paginateWorkflows

protected List paginateWorkflows(int pageNum)
                          throws InstanceRepositoryException
Parameters:
pageNum -
Returns:
Throws:
InstanceRepositoryException

paginateWorkflows

protected abstract List paginateWorkflows(int pageNum,
                                          String status)
                                   throws InstanceRepositoryException
Parameters:
pageNum -
status -
Returns:
Throws:
InstanceRepositoryException


Copyright © 1999-2011 Apache OODT. All Rights Reserved.