/* (non-Javadoc)
  * @see org.rimudb.generic.binders.IIterativeResultSetBinder#processSingleResultSet(java.sql.ResultSet, java.lang.Object[])
  */
 public Object processSingleResultSet(ResultSet rs) throws RimuDBException {
   if (tableList == null) {
     throw new IllegalArgumentException("initialize() method must initialize the table");
   }
   DataObject dataObjectArray[] = new DataObject[dataObjectClasses.length];
   for (int i = 0; i < dataObjectArray.length; i++) {
     dataObjectArray[i] = tableList.get(i).createDataObject(rs);
   }
   return dataObjectArray;
 }
Example #2
0
 /**
  * Return all the InvoiceLineDOs that match the WhereList. If the WhereList is null, then all
  * records in the table will be returned.
  *
  * <p>Specify an OrderByList to control the sort order of the data objects returned. If the
  * OrderByList is null then the records are returned in primary key sequence.
  *
  * <p>The parameter maxRecords determines how many records are returned. Use
  * AbstractFinder.ALL_RECORDS to return all the records that match the WhereList.
  *
  * @return InvoiceLineDO[]
  */
 public InvoiceLineDO[] select(WhereList whereList, OrderByList orderByList, int maxRecords)
     throws RimuDBException {
   List<? extends DataObject> list = selectAsList(whereList, orderByList, maxRecords);
   return (InvoiceLineDO[]) list.toArray(new InvoiceLineDO[list.size()]);
 }
 /* (non-Javadoc)
  * @see org.rimudb.generic.binders.IIterativeResultSetBinder#initialize(org.rimudb.Database)
  */
 public void initialize(Database database) throws RimuDBException {
   tableList = new ArrayList<Table>();
   for (int i = 0; i < dataObjectClasses.length; i++) {
     tableList.add(database.getTable(dataObjectClasses[i]));
   }
 }