Package org.red5.io.object
Class RecordSet
- java.lang.Object
-
- org.red5.io.object.RecordSet
-
public class RecordSet extends Object
Read only RecordSet object that might be received through remoting calls. There are 3 types of data fetching:- On demand (used by default)
- Fetch all at once
- Page-by-page fetching
For last mode, use page size property to specify maximum number of rows on one page
- Author:
- The Red5 Project, Joachim Bauch (jojo@struktur.de)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getColumnNames()Return a list containing the names of the columns in the recordset.List<Object>getItemAt(int index)Return a specified item from the recordset.intgetLength()Get the total number of items.intgetNumberAvailable()Get the number of items already received from the server.booleanisFullyPopulated()Check if all items are available on the client.Map<String,Object>serialize()Return Map that can be serialized as result.voidsetDeliveryMode(String mode)Set the mode for fetching paged results.voidsetDeliveryMode(String mode, int pageSize)Set the mode for fetching paged results with given max page size.voidsetDeliveryMode(String mode, int pageSize, int prefetchCount)Set the mode for fetching paged results with given max page size and number of prefetched pages.voidsetRemotingClient(IRemotingClient client)Set the remoting client to use for retrieving of paged results.
-
-
-
Constructor Detail
-
RecordSet
public RecordSet(Input input)
Creates recordset from Input object- Parameters:
input- input
-
-
Method Detail
-
setRemotingClient
public void setRemotingClient(IRemotingClient client)
Set the remoting client to use for retrieving of paged results.- Parameters:
client- Remoting client that works with this Recordset
-
setDeliveryMode
public void setDeliveryMode(String mode)
Set the mode for fetching paged results.- Parameters:
mode- Mode for fetching of results
-
setDeliveryMode
public void setDeliveryMode(String mode, int pageSize)
Set the mode for fetching paged results with given max page size.- Parameters:
mode- Mode for fetching of resultspageSize- Max page size
-
setDeliveryMode
public void setDeliveryMode(String mode, int pageSize, int prefetchCount)
Set the mode for fetching paged results with given max page size and number of prefetched pages.- Parameters:
mode- Mode for fetching of resultspageSize- Max page sizeprefetchCount- Number of prefetched pages (not implemented yet)
-
getColumnNames
public List<String> getColumnNames()
Return a list containing the names of the columns in the recordset.- Returns:
- Column names set
-
getItemAt
public List<Object> getItemAt(int index)
Return a specified item from the recordset. If the item is not available yet, it will be received from the server.- Parameters:
index- Item index- Returns:
- Item from recordset
-
getLength
public int getLength()
Get the total number of items.- Returns:
- Number of items
-
getNumberAvailable
public int getNumberAvailable()
Get the number of items already received from the server.- Returns:
- Nsumber of received items
-
isFullyPopulated
public boolean isFullyPopulated()
Check if all items are available on the client.- Returns:
- number of available items
-
-