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
-
AddTimeSlicesQuery(Vector)
- Constructs a new time slice addition query for the given slices.
-
addWorkDoneRowToDataSet(QueryDataSet, int, long, long)
- Adds a new row to the 'WorkDone' table.
-
calculate(QueryDataSet)
- Finalizes the query by adding time slices to the given dataset.
-
doValidationCheck()
- Checks that database manager has fetched proper markers before executing
this query.
-
getSQLClause()
- Returns the SQL query for creating the needed dataset.
-
isWriteQuery()
- Returns
true
.
AddTimeSlicesQuery
public AddTimeSlicesQuery(Vector timeSlices)
- Constructs a new time slice addition query for the given slices.
- Parameters:
- timeSlices - The TimeSlice objects to be added.
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
doValidationCheck
public void doValidationCheck() throws ValidationException
- Checks that database manager has fetched proper markers before executing
this query.
- Overrides:
- doValidationCheck in class DatabaseQuery
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
isWriteQuery
public boolean isWriteQuery()
- Returns
true
.
- Returns:
-
true
- Overrides:
- isWriteQuery in class DatabaseQuery
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