Package org.araneaframework.backend.list.model

Examples of org.araneaframework.backend.list.model.ListItemsData


   * Returns <code>List</code> of all processed items.
   *
   * @return <code>List</code> of all processed items.
   */
  public ListItemsData getAllItems() throws Exception {
    ListItemsData result = new ListItemsData();

    process(this.currentFilter, this.currentOrder, this.allData,
        this.processedData);
    result.setItemRange(this.processedData);
    result.setTotalCount(getItemCount());

    return result;
  }
View Full Code Here


   *            the start of item range.
   * @param count
   *            the count of items in the range.
   */
  public ListItemsData getItemRange(Long start, Long count) throws Exception {
    ListItemsData result = new ListItemsData();

    process(this.currentFilter, this.currentOrder, this.allData,
        this.processedData);
    result.setItemRange(getSubList(this.processedData, start.intValue(),
        count == null ? -1 : start.intValue() + count.intValue() - 1));
    result.setTotalCount(getItemCount());
    return result;
  }
View Full Code Here

   * @throws Exception if item range refreshing doesn't succeed.
   */
  public void refreshCurrentItemRange() throws Exception {
    log.debug("Refreshing current item range");
   
    ListItemsData itemRangeData;
   
    itemRangeData = this.listDataProvider.getItemRange(new Long(this.sequenceHelper
        .getCurrentPageFirstItemIndex()), new Long(this.sequenceHelper.getItemsOnPage()));
   
    this.itemRange = itemRangeData.getItemRange();
    this.sequenceHelper.setTotalItemCount(itemRangeData.getTotalCount().intValue());
    this.sequenceHelper.validateSequence();
  }
View Full Code Here

   * @throws InstantiationException
   * @throws SQLException
   */
  public ListItemsData getListItemsData(Class beanClass) throws SQLException,
  InstantiationException, IllegalAccessException {
    ListItemsData result = new ListItemsData();
    result.setTotalCount(this.totalCount);
   
    this.beanMapper = new BeanMapper(beanClass);
   
    List itemRange = new ArrayList();
    //XXX add capacity
   
    while (this.itemRangeResultSet.next()) {
      Object record = beanClass.newInstance();
      readBeanFields(this.itemRangeResultSet, record);
      itemRange.add(record);
    }
   
    result.setItemRange(itemRange);
   
    return result;
  }
View Full Code Here

    helper.setSqlQuery(query.toString());
    helper.addStatementParams(helper.getDatabaseFilterParams());
    helper.addStatementParams(helper.getDatabaseOrderParams());

    ListItemsData data;
    try {
      log.debug("Executing Queries");
      helper.setDataSource(this.dataSource);
      helper.execute();
      data = helper.getListItemsData(PersonMO.class);
View Full Code Here

TOP

Related Classes of org.araneaframework.backend.list.model.ListItemsData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.