org.kuali.rice.kim.api.responsibility
Class ResponsibilityQueryResults

java.lang.Object
  extended by org.kuali.rice.kim.api.responsibility.ResponsibilityQueryResults
All Implemented Interfaces:
Serializable, QueryResults<Responsibility>, ModelObjectBasic, ModelObjectComplete

public class ResponsibilityQueryResults
extends Object
implements QueryResults<Responsibility>, ModelObjectComplete

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Nested Class Summary
static class ResponsibilityQueryResults.Builder
           
static class ResponsibilityQueryResults.Constants
          Defines some internal constants used on this class.
static class ResponsibilityQueryResults.Elements
          A private class which exposes constants which define the XML element names to use when this object is marshaled to XML.
 
Field Summary
private  Collection<Element> _futureElements
           
private  boolean moreResultsAvailable
           
private  List<Responsibility> results
           
private  Integer totalRowCount
           
 
Constructor Summary
private ResponsibilityQueryResults()
           
private ResponsibilityQueryResults(ResponsibilityQueryResults.Builder builder)
           
 
Method Summary
 boolean equals(Object obj)
          All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.
 List<Responsibility> getResults()
          Return the list of results that are contained within.
 Integer getTotalRowCount()
          Gets the total number of records that match the executed query.
 int hashCode()
          All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.
 boolean isMoreResultsAvailable()
          Indicates if there are more results available for the query immediately following the last result that was returned.
 String toString()
          This will return a proper string representation of the Model Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

results

private final List<Responsibility> results

totalRowCount

private final Integer totalRowCount

moreResultsAvailable

private final boolean moreResultsAvailable

_futureElements

private final Collection<Element> _futureElements
Constructor Detail

ResponsibilityQueryResults

private ResponsibilityQueryResults()

ResponsibilityQueryResults

private ResponsibilityQueryResults(ResponsibilityQueryResults.Builder builder)
Method Detail

getResults

public List<Responsibility> getResults()
Description copied from interface: QueryResults
Return the list of results that are contained within. This list can be empty but it should never be null.

Specified by:
getResults in interface QueryResults<Responsibility>
Returns:
the list of results

getTotalRowCount

public Integer getTotalRowCount()
Description copied from interface: QueryResults
Gets the total number of records that match the executed query. Note that this number will not necessarily match the number of results returned by QueryResults.getResults() as the query may cut off the number of records returned by the actual query request. In these cases, the total row count represents the total number of results which would be returned by the query if there was no cap on the results returned (i.e. the equivalent of the result of a "count" query in SQL).

The total row count is optional depending on whether or not the client requested the total row count when invoking the query. The client requests this information by setting the CountFlag.INCLUDE or CountFlag.ONLY on the QueryByCriteria. It's also possible that the query is unable to produce a total row count depending on the back-end implementation, in which cases this value will also not be available.

Will never be less than 0.

Specified by:
getTotalRowCount in interface QueryResults<Responsibility>
Returns:
the total number of rows, or null if the total row count was not requested by the query or could not be determined

isMoreResultsAvailable

public boolean isMoreResultsAvailable()
Description copied from interface: QueryResults
Indicates if there are more results available for the query immediately following the last result that was returned. In this case, the records returned in QueryResults.getResults() will not include the complete result set for the query. This could be because the query only requested a certain number of rows, or that the query couldn't return the number of rows that were requested.

It is intended that this value be used to facilitate paging or reporting in the client in cases where that is desired.

This information will only be available if the client sets a limit on the results returned. This limit is set with the maxResults field on the QueryByCriteria.

Specified by:
isMoreResultsAvailable in interface QueryResults<Responsibility>
Returns:
true if there are more results available for the query, false otherwise

hashCode

public int hashCode()
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.

Specified by:
hashCode in interface ModelObjectComplete
Overrides:
hashCode in class Object
Returns:
the hashCode value

equals

public boolean equals(Object obj)
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.

Specified by:
equals in interface ModelObjectComplete
Overrides:
equals in class Object
Parameters:
obj - to object to compare for equality
Returns:
if equal

toString

public String toString()
Description copied from interface: ModelObjectBasic
This will return a proper string representation of the Model Object. All of the fields comprising the "public" api should be represented in the return value.

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class Object
Returns:
the string representation


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.