All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tc.database.AddTimeSlicesQuery

java.lang.Object
   |
   +----tc.database.DatabaseQuery
           |
           +----tc.database.AddTimeSlicesQuery

public class AddTimeSlicesQuery
extends DatabaseQuery
AddTimeSlicesQuery implements the abstract methods in DatabaseQuery so that calling them causes time slice insertion. The time slices to be inserted are given as constructor parameters.

Version:
0.30, 1998/04/01
Author:
FRED development team, Antti Viljamaa

Constructor Index

 o AddTimeSlicesQuery(Vector)
Constructs a new time slice addition query for the given slices.

Method Index

 o addWorkDoneRowToDataSet(QueryDataSet, int, long, long)
Adds a new row to the 'WorkDone' table.
 o calculate(QueryDataSet)
Finalizes the query by adding time slices to the given dataset.
 o doValidationCheck()
Checks that database manager has fetched proper markers before executing this query.
 o getSQLClause()
Returns the SQL query for creating the needed dataset.
 o isWriteQuery()
Returns true.

Constructors

 o AddTimeSlicesQuery
 public AddTimeSlicesQuery(Vector timeSlices)
Constructs a new time slice addition query for the given slices.

Parameters:
timeSlices - The TimeSlice objects to be added.

Methods

 o calculate
 public void calculate(QueryDataSet dataset) throws DataSetException, ValidationException
Finalizes the query by adding time slices to the given dataset.

Overrides:
calculate in class DatabaseQuery
 o doValidationCheck
 public void doValidationCheck() throws ValidationException
Checks that database manager has fetched proper markers before executing this query.

Overrides:
doValidationCheck in class DatabaseQuery
 o getSQLClause
 public String getSQLClause()
Returns the SQL query for creating the needed dataset.

Returns:
String A string representing the query.
Overrides:
getSQLClause in class DatabaseQuery
 o isWriteQuery
 public boolean isWriteQuery()
Returns true.

Returns:
true
Overrides:
isWriteQuery in class DatabaseQuery
 o addWorkDoneRowToDataSet
 private void addWorkDoneRowToDataSet(QueryDataSet dataset,
                                      int markerID,
                                      long startTime,
                                      long endTime) throws DataSetException, InvalidMarkerException
Adds a new row to the 'WorkDone' table.

Parameters:
dataset - The dataset which represents the contents of the 'WorkDone' table.
markerID - The marker id.
startTime - Start time as milliseconds since 01.01.1970.
endTime - End time as milliseconds since 01.01.1970.

All Packages  Class Hierarchy  This Package  Previous  Next  Index