Elexis API documentation
Version 2.1.6 as of December 11 2011

waelti.statistics.queries
Class AbstractQuery

java.lang.Object
  extended by Job
      extended by ch.elexis.actions.BackgroundJob
          extended by waelti.statistics.queries.AbstractQuery
Direct Known Subclasses:
AbstractTimeSeries

public abstract class AbstractQuery
extends BackgroundJob

This abstract class represents all queries. A query returns a matrix containing all information which are computed. The Headings are used to identify the information of each column.
The view for each query is constructed by a meta model which checks all classes for getter/setter methods annotated with the SetProperty and GetProperty annotations. For each getter/setter pair there is one text field displayed. All parameters and return values of the annotated methods have to be strings. These methods may throw a SetDataException if the setter parameter received from the text field is wrongly formatted. The error message of the exception will be displayed to the user. For a detailed example see Consultations.

Author:
michael waelti
See Also:
SetProperty, GetProperty, Consultations

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.actions.BackgroundJob
BackgroundJob.BackgroundJobListener
 
Method Summary
abstract  IStatus execute(IProgressMonitor monitor)
          This method is used to actually execute the query.
 IStructuredContentProvider getContentProvider()
          Returns a content provider containing the model which is represented by this query.
abstract  java.lang.String getDescription()
          a short description to be displayed in the query dialog by the metamodel.
 java.lang.String getHeader()
          Returns a string which describes the actual query with all its settings.
 ITableLabelProvider getLabelProvider()
          Returns the query's output as a label provider
 ResultMatrix getMatrix()
          Returns a result matrix object.
abstract  java.util.List<java.lang.String> getTableHeadings()
          Returns the list containing of all columns header, e.g. for a table.
abstract  java.lang.String getTitle()
          getName() used by BackgroundJob.
 
Methods inherited from class ch.elexis.actions.BackgroundJob
addListener, getData, getJobname, getSize, invalidate, isValid, removeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTableHeadings

public abstract java.util.List<java.lang.String> getTableHeadings()
Returns the list containing of all columns header, e.g. for a table.


getHeader

public java.lang.String getHeader()
Returns a string which describes the actual query with all its settings. Used as a header before the result table.


getTitle

public abstract java.lang.String getTitle()
getName() used by BackgroundJob. Returns the name of this query. Used by the metamodel.


getDescription

public abstract java.lang.String getDescription()
a short description to be displayed in the query dialog by the metamodel.


execute

public abstract IStatus execute(IProgressMonitor monitor)
This method is used to actually execute the query. Inherited from BackgroundJob.

Specified by:
execute in class BackgroundJob

getContentProvider

public IStructuredContentProvider getContentProvider()
Returns a content provider containing the model which is represented by this query.


getLabelProvider

public ITableLabelProvider getLabelProvider()
Returns the query's output as a label provider


getMatrix

public ResultMatrix getMatrix()
Returns a result matrix object.


Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis