/** * Converts a RowSet into a PageableRowSet, stores the PageableRowSet * result in the cache and then returns the PageableRowSet. A unique * id will be created for the PagedRowSet. * * @param rowset RowSet to be cached for paged access. * @param pageSize Size of the first page to be sent to the client. Default * is 25 if pageSize is set to 0 or less. If all records should be sent at once * consider not caching the RowSet or specify Integer.MAX_VALUE. * * @return resulting <tt>PageableRowSet</tt> of the <tt>RowSet</tt> conversion */ public static PageableRowSet cacheRowSet(RowSet rowset, int pageSize) { if (pageSize <= 0) pageSize = DEFAULT_PAGE_SIZE; PageableRowSet prs = new PagedRowSet(rowset, pageSize, true); cachePageableRowSet(prs); return prs; }
/** * Constructor * <p> * Creates a UUID for this object. Format: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' * </p> * * @param r The RowSet to be paged. * @param p The initial page size. */ public PagedRowSet(RowSet r, int p) { serviceName = DEFAULT_PAGING_SERVICE_NAME; rowSet = r; pageSize = p; id = UUIDUtils.createUUID(); init(); }
private void init() { if (rowSet != null) { //Initialize columns initColumns(); //Initialize records initRecords(); } else { colNames = new String[0]; } }
/** * Converts a RowSet into a PageableRowSet, stores the PageableRowSet * result in the cache and then returns the PageableRowSet. A unique * id will be created for the PagedRowSet. * * @param rowset RowSet to be cached for paged access. * @param pageSize Size of the first page to be sent to the client. Default * is 25 if pageSize is set to 0 or less. If all records should be sent at once * consider not caching the RowSet or specify Integer.MAX_VALUE. * * @return resulting <tt>PageableRowSet</tt> of the <tt>RowSet</tt> conversion */ public static PageableRowSet cacheRowSet(RowSet rowset, int pageSize) { if (pageSize <= 0) pageSize = DEFAULT_PAGE_SIZE; PageableRowSet prs = new PagedRowSet(rowset, pageSize, true); cachePageableRowSet(prs); return prs; }
private void init() { if (rowSet != null) { //Initialize columns initColumns(); //Initialize records initRecords(); } else { colNames = new String[0]; } }
/** * Allows the unique id generation of the RowSet to be toggled. * * @see #PagedRowSet(RowSet, int) */ public PagedRowSet(RowSet r, int p, boolean createID) { serviceName = DEFAULT_PAGING_SERVICE_NAME; rowSet = r; pageSize = p; if (createID) { id = UUIDUtils.createUUID(); } init(); }
instance = new PagedRowSet((RowSet)instance, HUGE_PAGE_SIZE, false);
private void init() { if (rowSet != null) { //Initialize columns initColumns(); //Initialize records initRecords(); } else { colNames = new String[0]; } }
/** * Constructor * <p> * Creates a UUID for this object. Format: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' * </p> * * @param r The RowSet to be paged. * @param p The initial page size. */ public PagedRowSet(RowSet r, int p) { serviceName = DEFAULT_PAGING_SERVICE_NAME; rowSet = r; pageSize = p; id = UUIDUtils.createUUID(); init(); }
instance = new PagedRowSet((RowSet)instance, HUGE_PAGE_SIZE, false);
/** * Allows the unique id generation of the RowSet to be toggled. * @see #PagedRowSet(RowSet, int) * * @param r the row set * @param p the page size * @param createID should we create an id? */ public PagedRowSet(RowSet r, int p, boolean createID) { serviceName = DEFAULT_PAGING_SERVICE_NAME; rowSet = r; pageSize = p; if (createID) { id = UUIDUtils.createUUID(); } init(); }
instance = new PagedRowSet((RowSet)instance, HUGE_PAGE_SIZE, false);
/** * Constructor * <p> * Creates a UUID for this object. Format: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' * </p> * * @param r The RowSet to be paged. * @param p The initial page size. */ public PagedRowSet(RowSet r, int p) { serviceName = DEFAULT_PAGING_SERVICE_NAME; rowSet = r; pageSize = p; id = UUIDUtils.createUUID(); init(); }
o = new PagedRowSet((RowSet)o, Integer.MAX_VALUE, false);