|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IP3MDatabase
Database interface for P3J. It provides loading, saving, and look-up means
for all parts of the PPPM that ought to be persistent (e.g.,
Parameter
, ParameterInstance
, Set
, SetType
).
Created on January 11, 2007
Method Summary | |
---|---|
void |
clear()
Clears the database. |
void |
clearCache(Object o)
Clears the given object from cache. |
void |
close()
Closes the database connection. |
void |
deleteAllResults(ProjectionModel projection)
Delete all results of the projection. |
boolean |
deleteMatrix(Matrix matrix)
Deletes given matrix from the database. |
boolean |
deleteParameter(Parameter parameter)
Deletes given parameter from database. |
boolean |
deleteParameterAssignment(ParameterAssignment assignment)
Deletes given parameter assignment. |
boolean |
deleteParameterInstance(ParameterInstance instance)
Deletes given parameter instances from the data base. |
boolean |
deleteProjection(ProjectionModel projection)
Delete projection from database. |
void |
deleteResult(ResultsOfTrial resultOfTrial)
Deletes a result. |
boolean |
deleteSet(Set set)
Deletes given set from database. |
boolean |
deleteSeType(SetType setType)
Delete SetType from database. |
List<Matrix> |
getAllMatrices()
Retrieves all input matrices from the database. |
List<ParameterAssignment> |
getAllParameterAssignments(ParameterInstance paramInstance)
Retrieves all ParameterAssignment entities for a certain
ParameterInstance . |
List<ParameterInstance> |
getAllParameterInstances()
Retrieves list with all parameter instances. |
List<Parameter> |
getAllParameters()
Retrieves list with all parameters. |
List<ProjectionModel> |
getAllProjections()
Retrieves list of all projections from the database. |
List<ResultsOfTrial> |
getAllResults(ProjectionModel projection)
Retrieves all results for the given projection. |
List<Set> |
getAllSets()
Retrieves all sets from database. |
List<SetType> |
getAllSetTypes()
Retrieve all Settypes from data base. |
Matrix |
getMatrix(Matrix2D value)
Get matrix with a certain value from database. |
Parameter |
getParameter(String name)
Retrieves a parameter with the given name from the database. |
ParameterInstance |
getParameterInstance(Parameter param,
int generation)
Retrieves a parameter instance from the database. |
ProjectionModel |
getProjectionByID(int id)
Retrieves projection by id. |
IProjectionResultsIterator |
getResultIterator(ProjectionModel projection)
Gets the result iterator. |
void |
init(james.core.data.DBConnectionData dbConn)
Initialize database connection. |
Matrix |
newMatrix(Matrix2D value)
Creates a new matrix if a matrix with the same values is not already existing in the system. |
Parameter |
newParameter(String name,
boolean genDep,
MatrixDimension height,
MatrixDimension width,
Population population)
Creates a new parameter (if not already existent) and returns it. |
ParameterAssignment |
newParameterAssignment(ParameterInstance paramInstance,
String name,
String description,
double probability,
double deviation,
Matrix2D value)
Creates a new parameter assignment. |
ParameterInstance |
newParameterInstance(int comparisonIndex,
Parameter param,
int generation)
Creates new parameter instance. |
void |
newProjection(ProjectionModel projection)
Adds new projection to database, automatically adds any Parameter
or ParameterInstance entities that have not yet been created. |
Set |
newSet(List<ParameterInstance> params,
String name,
String desc,
double prob)
Creates a new set. |
SetType |
newSetType(String name,
String description)
Create new Settype. |
void |
open()
Establishes database connection. |
void |
saveParameterAssignment(ParameterAssignment assignment)
Saves given parameter assignment. |
void |
saveProjection(ProjectionModel projection)
Saves projection. |
void |
saveSet(Set set)
Updates the set. |
void |
saveSetType(SetType setType)
Updates the Settype. |
void |
saveTrialResults(ResultsOfTrial resultOfTrial)
Saves results of a single trial. |
Method Detail |
---|
void init(james.core.data.DBConnectionData dbConn)
dbConn
- the connection detailsvoid open()
void clear()
void close()
Parameter newParameter(String name, boolean genDep, MatrixDimension height, MatrixDimension width, Population population)
name
- name of the parametergenDep
- flag to determine generation dependencyheight
- height of parameter valueswidth
- width of parameter valuespopulation
- the population to which this parameter refers
Parameter getParameter(String name)
name
- the name of the parameter to be retrieved
List<Parameter> getAllParameters()
Parameter
instances stored in the databaseboolean deleteParameter(Parameter parameter)
parameter
- the parameter to be deleted
ParameterInstance newParameterInstance(int comparisonIndex, Parameter param, int generation)
comparisonIndex
- comparison index of the instanceparam
- the associated parametergeneration
- the generation of the instance
ParameterInstance getParameterInstance(Parameter param, int generation)
param
- the associated parametergeneration
- the generation for which the parameter shall be instantiated
List<ParameterInstance> getAllParameterInstances()
boolean deleteParameterInstance(ParameterInstance instance)
instance
- the instance to be deleted
Matrix newMatrix(Matrix2D value)
value
- the value of the matrix
Matrix getMatrix(Matrix2D value)
value
- the value of the matrix
List<Matrix> getAllMatrices()
boolean deleteMatrix(Matrix matrix)
matrix
- the matrix to be deleted
ParameterAssignment newParameterAssignment(ParameterInstance paramInstance, String name, String description, double probability, double deviation, Matrix2D value)
paramInstance
- the associated parameter instancename
- the name of the assignmentdescription
- the description of the assignmentprobability
- the probability of the assignmentdeviation
- the assumption-inherent deviation, i.e. the noisevalue
- the assigned value
List<ParameterAssignment> getAllParameterAssignments(ParameterInstance paramInstance)
ParameterAssignment
entities for a certain
ParameterInstance
.
paramInstance
- the parameter instance
boolean deleteParameterAssignment(ParameterAssignment assignment)
assignment
- the assignment to be deleted
void saveParameterAssignment(ParameterAssignment assignment)
assignment
- the parameter assignmentSet newSet(List<ParameterInstance> params, String name, String desc, double prob)
params
- parameter instance for which assignments can be definedname
- name of the setdesc
- description of the setprob
- probability of the set
void saveSet(Set set)
ParameterAssignmentSet
instances as well.
set
- the set to be updatedboolean deleteSet(Set set)
set
- the set to be deleted
List<Set> getAllSets()
SetType newSetType(String name, String description)
name
- name of the Settype to be createddescription
- description of the Settype to be created
void saveSetType(SetType setType)
Set
instances as well.
setType
- the Settype to be updatedList<SetType> getAllSetTypes()
boolean deleteSeType(SetType setType)
SetType
from database.
setType
- the Settype to be deleted
void newProjection(ProjectionModel projection)
Parameter
or ParameterInstance
entities that have not yet been created.
projection
- the new projectionList<ProjectionModel> getAllProjections()
Exception
- if lookup failsProjectionModel getProjectionByID(int id)
id
- the id of the projection
boolean deleteProjection(ProjectionModel projection)
projection
- the projection to be deleted
void saveProjection(ProjectionModel projection)
projection
- the projection to be saved/updatedvoid saveTrialResults(ResultsOfTrial resultOfTrial)
resultOfTrial
- the result of the trialList<ResultsOfTrial> getAllResults(ProjectionModel projection)
projection
- the projection
void deleteResult(ResultsOfTrial resultOfTrial)
resultOfTrial
- the result of trialvoid deleteAllResults(ProjectionModel projection)
projection
- the projectionIProjectionResultsIterator getResultIterator(ProjectionModel projection)
projection
- the projection for which the results shall be gathered
void clearCache(Object o)
o
- the object to be cleared from cache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |