com.bea.ales.management.query
Interface QueryResult

All Known Implementing Classes:
MetaObjectQueryResult, com.bea.ales.management.query.MultiQueryResultImpl

public interface QueryResult

This interface represents a query result. It provides methods to iterate over the result and find items from the result.


Method Summary
 void close()
          Close the Query Result.
 void enablePaging(boolean enablePaging)
          Enable paging.
 java.lang.Object getNextItem()
          Return the next availible object in the result.
 int getNumberofPages()
          Return the number of pages for the result on the count/page-size.
 java.lang.Object getPreviousItem()
          Return the previous availible object in the result.
 java.lang.String getQueryString()
          Return the query string associated with the query result.
 boolean hasNext()
          Return true if there is next object availible in the result.
 boolean hasPrevious()
          Return true if there is previous object availible in the result.
 boolean isPagingEnabled()
          Detect whether paging is enabled.
 void loadAllResults()
          Load all the result for the query.
 void refresh()
          Refresh the query result.
 void setHoldSize(int holdSize)
          Set the hold size of this query result.
 void setPageSize(int size)
          Set the page size for this query result.
 

Method Detail

getNextItem

public java.lang.Object getNextItem()
                             throws ManagementException
Return the next availible object in the result.

Returns:
the next object in the result
Throws:
ManagementException - if operation fails.

getPreviousItem

public java.lang.Object getPreviousItem()
                                 throws ManagementException
Return the previous availible object in the result.

Returns:
the next object in the result.
Throws:
ManagementException - if operation fails.

hasNext

public boolean hasNext()
                throws ManagementException
Return true if there is next object availible in the result.

Returns:
true if next object is availible, false if no object is availible
Throws:
ManagementException - if operation fails.

hasPrevious

public boolean hasPrevious()
                    throws ManagementException
Return true if there is previous object availible in the result.

Returns:
true if previous object is availible, false if no object is availible
Throws:
ManagementException - if operation fails.

getNumberofPages

public int getNumberofPages()
                     throws ManagementException
Return the number of pages for the result on the count/page-size.

Returns:
the number of pages in the result set. -1 is returned if no page size is set. If count/page-size is a fraction then the return value is rounded up.
Throws:
ManagementException - if operation fails.

close

public void close()
           throws ManagementException
Close the Query Result. The query result will no longer be accessable.

Throws:
ManagementException - if operation fails.

refresh

public void refresh()
             throws ManagementException
Refresh the query result. The internal cached data will be cleared.

Throws:
ManagementException - if operation fails.

loadAllResults

public void loadAllResults()
                    throws ManagementException
Load all the result for the query. All result items of the query executed are populated to internal cache.

Throws:
ManagementException - if operation fails.

enablePaging

public void enablePaging(boolean enablePaging)
                  throws ManagementException
Enable paging. By default paging is enabled

Parameters:
enablePaging - true to enable pagin, false to disable it
Throws:
ManagementException - if operation fails.

isPagingEnabled

public boolean isPagingEnabled()
                        throws ManagementException
Detect whether paging is enabled.

Returns:
true if paging is enabled, falsi if it is diabled
Throws:
ManagementException - if operation fails.

getQueryString

public java.lang.String getQueryString()
                                throws ManagementException
Return the query string associated with the query result. An example return value would be "*" or "Admin*"

Returns:
the query String associated with the query result.
Throws:
ManagementException - if the opreation fails.

setHoldSize

public void setHoldSize(int holdSize)
Set the hold size of this query result. The hold size is the number of elements internal cached

Parameters:
holdSize - the number of element.

setPageSize

public void setPageSize(int size)
Set the page size for this query result. This is the number of elements that constitute a page of data to be retrieved.

Parameters:
size - size of the page.


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.