Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

waelti.statistics.queries
Class AbstractQuery

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.core.internal.jobs.InternalJob
          extended by org.eclipse.core.runtime.jobs.Job
              extended by ch.elexis.actions.BackgroundJob
                  extended by waelti.statistics.queries.AbstractQuery
All Implemented Interfaces:
java.lang.Comparable, org.eclipse.core.runtime.IAdaptable
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.

See Also:
SetProperty, GetProperty, Consultations

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.actions.BackgroundJob
BackgroundJob.BackgroundJobListener
 
Field Summary
 
Fields inherited from class ch.elexis.actions.BackgroundJob
jobname, listeners, log, result
 
Fields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
 
Fields inherited from class org.eclipse.core.internal.jobs.InternalJob
manager
 
Constructor Summary
protected AbstractQuery(java.lang.String name)
          standard constructor
 
Method Summary
abstract  org.eclipse.core.runtime.IStatus execute(org.eclipse.core.runtime.IProgressMonitor monitor)
          This method is used to actually execute the query.
 org.eclipse.jface.viewers.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.
 org.eclipse.jface.viewers.ITableLabelProvider getLabelProvider()
          Returns the query's output as a label provider
protected  java.util.List<java.lang.Object[]> getList()
           
 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.
protected  void setContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider contentProvider)
           
protected  void setLabelProvider(org.eclipse.jface.viewers.ITableLabelProvider labelProvider)
           
protected  void setList(java.util.List<java.lang.Object[]> list)
           
 
Methods inherited from class ch.elexis.actions.BackgroundJob
addListener, fireFinished, getData, getJobname, getSize, invalidate, isValid, removeListener, run
 
Methods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, belongsTo, cancel, canceling, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule
 
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareTo
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

AbstractQuery

protected AbstractQuery(java.lang.String name)
standard constructor

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 org.eclipse.core.runtime.IStatus execute(org.eclipse.core.runtime.IProgressMonitor monitor)
This method is used to actually execute the query. Inherited from BackgroundJob.

Specified by:
execute in class BackgroundJob

getContentProvider

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


getLabelProvider

public org.eclipse.jface.viewers.ITableLabelProvider getLabelProvider()
Returns the query's output as a label provider


getMatrix

public ResultMatrix getMatrix()
Returns a result matrix object.


setList

protected void setList(java.util.List<java.lang.Object[]> list)

getList

protected java.util.List<java.lang.Object[]> getList()

setLabelProvider

protected void setLabelProvider(org.eclipse.jface.viewers.ITableLabelProvider labelProvider)

setContentProvider

protected void setContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider contentProvider)

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013