Package org.nervousync.database.query
Class PartialCollection
java.lang.Object
org.nervousync.database.query.PartialCollection
- All Implemented Interfaces:
Serializable
Partial collection
- Version:
- $Revision : 1.0 $ $Date: Jan 13, 2010 4:07:14 PM $
- Author:
- Steven Wee wmkm0113@Hotmail.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPartialCollection(List<ResultMap> resultList, long totalCount) Creates new instance of PartialCollection with specified collection and total -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd boolean.asList()As list.<T> List<T>As list.<T> List<T>As list.Cache data string.longGets total number of elements in initial collectionbooleanisEmpty()Figures out is partial collection emptyiterator()Iterator.<T> Iterator<T>Iterator.static PartialCollectionParse partial collection.intsize()Gets the size of part of initial collection that is contained here
-
Constructor Details
-
PartialCollection
Creates new instance of PartialCollection with specified collection and total- Parameters:
resultList- Result listtotalCount- Total size of collection, which part is contained in this instance
-
-
Method Details
-
asList
As list.- Returns:
- the list
-
asList
As list.- Type Parameters:
T- the type parameter- Parameters:
clazz- the clazz- Returns:
- the list
-
asList
public <T> List<T> asList(Class<T> clazz, boolean forUpdate, long transactionalCode) throws DataModifiedException, EntityStatusException As list.- Type Parameters:
T- the type parameter- Parameters:
clazz- the clazzforUpdate- the for updatetransactionalCode- the transactional code- Returns:
- the list
- Throws:
DataModifiedException- the data modified exceptionEntityStatusException- the entity status exception
-
size
public int size()Gets the size of part of initial collection that is contained here- Returns:
- number of elements in partial collection
-
isEmpty
public boolean isEmpty()Figures out is partial collection empty- Returns:
trueif this collection is empty
-
add
Add boolean.- Parameters:
resultMap- the result map- Returns:
- the boolean
-
iterator
Iterator.- Returns:
- the iterator
-
iterator
Iterator.- Type Parameters:
T- the type parameter- Parameters:
clazz- the clazzforUpdate- the for updatetransactionalCode- the transactional code- Returns:
- the iterator
-
getTotalCount
public long getTotalCount()Gets total number of elements in initial collection- Returns:
- total number of elements
-
parse
Parse partial collection.- Parameters:
cacheData- the cache data- Returns:
- the partial collection
-
cacheData
Cache data string.- Returns:
- the string
-