Holger's Java API

## com.antelmann.db
Class EntryAnalyzer<T extends DBEntry>

    java.lang.Object
      com.antelmann.math.ObjectAnalyzer<T>
          com.antelmann.db.EntryAnalyzer<T>

All Implemented Interfaces:
  TimeDataParser<T>, Iterable<T>

    public class EntryAnalyzer<T extends DBEntry>

extends ObjectAnalyzer<T>

provides a convenient base and several methods to easily analyze aggregated DBEntry data; the underlying data can additionally be provided as a `DBClassStore`.

Since:
  3. August 2007, 00:10
Author:
  Holger Antelmann

Constructor Summary
`EntryAnalyzer()` creates an instance that simply has no data (as a cached, empty list)
`EntryAnalyzer(DBClassStore<T> store)`
`EntryAnalyzer(DBClassStore<T> store, Filter<? super T> filter)`
`EntryAnalyzer(Iterable<T> data)`
`EntryAnalyzer(Iterable<T> data, Filter<? super T> filter)`
`EntryAnalyzer(ValueRetriever<Enumeration<T>> retriever)`

Method Summary
`protected void` `clearData()` clears all data, so that another data source can be set
`DataMatrix<T>` `createLoadedMatrix(DataParser<? super T> parser, Monitor mon)`
`DBEnumeration<T>` `enumerate()` enumerates over the data; if the data is not based on a cached Collection but by a DBClassStore, transaction handling is required accordingly.
`DBClassStore<T>` `getStore()` may be null if this instance works off an iterable or another retriever
`void` `loadGrid(TimeDataGrid<T> grid, Monitor mon)`
`void` `setData(DBClassStore<T> store)`
`void` `setData(DBClassStore<T> store, Filter<? super T> filter)`

Methods inherited from class com.antelmann.math.ObjectAnalyzer
`createLoadedTimeDataGrid, createLoadedTimeDataGrid, extractCriteria, extractDate, extractNumber, getCachedData, getDateExtractor, getDateInterval, getFilter, getFilterString, getGrouping, getNumberExtractor, getValueType, iterator, setData, setData, setData, setData, setDateExtractor, setDateInterval, setFilter, setFilterString, setGrouping, setGroupingMethod, setNumberExtractor, setValueType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EntryAnalyzer

    public EntryAnalyzer()

  creates an instance that simply has no data (as a cached, empty list)

### EntryAnalyzer

    public EntryAnalyzer(Iterable<T> data)

### EntryAnalyzer

    public EntryAnalyzer(Iterable<T> data,
                         Filter<? super T> filter)

### EntryAnalyzer

    public EntryAnalyzer(DBClassStore<T> store)

### EntryAnalyzer

    public EntryAnalyzer(DBClassStore<T> store,
                         Filter<? super T> filter)

### EntryAnalyzer

    public EntryAnalyzer(ValueRetriever<Enumeration<T>> retriever)

Method Detail

### clearData

    protected void clearData()

  Description copied from class: `ObjectAnalyzer`
  clears all data, so that another data source can be set

  Overrides:
    `clearData` in class `ObjectAnalyzer<T extends DBEntry>`

### setData

    public void setData(DBClassStore<T> store)

### setData

    public void setData(DBClassStore<T> store,
                        Filter<? super T> filter)

### getStore

    public DBClassStore<T> getStore()

  may be null if this instance works off an iterable or another retriever

### enumerate

    public DBEnumeration<T> enumerate()
                                               throws IOException

  enumerates over the data; if the data is not based on a cached Collection but by a DBClassStore, transaction handling is required accordingly. If a store is present, it will used along with the filter before super is called.

  Overrides:
    `enumerate` in class `ObjectAnalyzer<T extends DBEntry>`
  Throws:
    `IOException`
  See Also:
    `DBUtils.runInTransaction(Task, com.antelmann.db.DBTransaction, boolean)`

### createLoadedMatrix

    public DataMatrix<T> createLoadedMatrix(DataParser<? super T> parser,
                                            Monitor mon)
                                                     throws IOException

  Overrides:
    `createLoadedMatrix` in class `ObjectAnalyzer<T extends DBEntry>`
  Throws:
    `IOException`

### loadGrid

    public void loadGrid(TimeDataGrid<T> grid,
                         Monitor mon)
                  throws IOException

  Overrides:
    `loadGrid` in class `ObjectAnalyzer<T extends DBEntry>`
  Throws:
    `IOException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads