|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Data Access Layer API, used to access data stores in a generic way, deferring the implementation details to specific Data Access Strategies.
| Method Summary | |
void |
addModel(com.redstarhackers.model.Model model)
Add the model to the data store. |
java.util.List |
executeNamedQuery(java.lang.String queryName,
java.util.List parameters)
Execute the named query using the parameters, returning the results (if any). |
java.util.List |
executeNamedQuery(java.lang.String queryName,
java.util.List parameters,
int firstResult,
int maxResults)
Execute the named query using the parameters, returning the results (if any). |
java.util.List |
executeNamedQuery(java.lang.String queryName,
java.util.Map parameters)
Execute the named query using the parameters, returning the results (if any). |
java.util.List |
executeNamedQuery(java.lang.String queryName,
java.util.Map parameters,
int firstResult,
int maxResults)
Execute the named query using the parameters, returning the results (if any). |
int |
executeNamedStatement(java.lang.String statementName,
java.util.List parameters)
Execute the statement using the parameters, returning the results (if any). |
int |
executeNamedStatement(java.lang.String statementName,
java.util.Map parameters)
Execute the statement using the parameters, returning the results (if any). |
java.util.List |
executeQuery(Query query,
java.lang.Class resultClass)
Execute the query using any contained expression (or chain of expressions) to qualify the query, returning the results (if any). |
java.util.List |
executeQuery(Query query,
java.lang.Class resultClass,
int firstResult,
int maxResults)
Execute the query using any contained expression (or chain of expressions) to qualify the query, returning the results (if any). |
java.util.List |
executeQuery(Query query,
java.lang.Class resultClass,
java.util.List parameters)
Execute the query using the parameters, returning the results (if any) as instances of the model class. |
java.util.List |
executeQuery(Query query,
java.lang.Class resultClass,
java.util.List parameters,
int firstResult,
int maxResults)
Execute the query using the parameters, returning the results (if any) as instances of the model class. |
java.util.List |
executeQuery(Query query,
java.lang.Class resultClass,
java.util.Map parameters)
Execute the query using the parameters, returning the results (if any) as instances of the model class. |
java.util.List |
executeQuery(Query query,
java.lang.Class resultClass,
java.util.Map parameters,
int firstResult,
int maxResults)
Execute the query using the parameters, returning the results (if any) as instances of the model class. |
int |
executeStatement(java.lang.String statement,
java.util.List parameters)
Execute the statement using the parameters, returning the results (if any). |
int |
executeStatement(java.lang.String statement,
java.util.Map parameters)
Execute the statement using the parameters, returning the results (if any). |
Query |
getNamedQuery(java.lang.String name)
Retrieve the query mapped to the given name. |
java.lang.String |
getNamedStatement(java.lang.String name)
Retrieve the statement mapped to the given name. |
com.redstarhackers.model.Model |
loadModel(java.lang.Class modelClass,
java.io.Serializable identifier)
Load an Model object through its unique identifier. |
void |
removeModel(java.lang.Class modelClass,
java.io.Serializable identifier)
Delete a given model of the specified class using the unique identifier. |
void |
removeModel(com.redstarhackers.model.Model model)
Delete a given model from the data store. |
void |
updateModel(com.redstarhackers.model.Model model)
Save the model in the data store, updating its persistent state. |
void |
updateModel(com.redstarhackers.model.Model model,
java.io.Serializable identifier)
Save the model in the data store, updating its persistent state. |
| Method Detail |
public com.redstarhackers.model.Model loadModel(java.lang.Class modelClass,
java.io.Serializable identifier)
modelClass - class to load foridentifier - unique identifier
public void addModel(com.redstarhackers.model.Model model)
model - the model to addpublic void updateModel(com.redstarhackers.model.Model model)
model - the data to update with
public void updateModel(com.redstarhackers.model.Model model,
java.io.Serializable identifier)
model - the data to update withidentifier - unique identifierpublic void removeModel(com.redstarhackers.model.Model model)
model - the model to remove
public void removeModel(java.lang.Class modelClass,
java.io.Serializable identifier)
modelClass - class to load foridentifier - unique identifierpublic Query getNamedQuery(java.lang.String name)
name - the name to retrieve the query for.
public java.util.List executeNamedQuery(java.lang.String queryName,
java.util.Map parameters)
queryName - the name of the queryparameters - the parameters (name => value)
public java.util.List executeNamedQuery(java.lang.String queryName,
java.util.Map parameters,
int firstResult,
int maxResults)
queryName - the name of the queryparameters - the parameters (name => value)firstResult - first row in the result set to start atmaxResults - max number of rows to return (0 means all)
public java.util.List executeNamedQuery(java.lang.String queryName,
java.util.List parameters)
queryName - the name of the queryparameters - the parameters (positional)
public java.util.List executeNamedQuery(java.lang.String queryName,
java.util.List parameters,
int firstResult,
int maxResults)
queryName - the name of the queryparameters - the parameters (positional)firstResult - first row in the result set to start atmaxResults - max number of rows to return (0 means all)
public java.util.List executeQuery(Query query,
java.lang.Class resultClass,
java.util.Map parameters)
query - the queryresultClass - the class to use for the resulting rowsparameters - the parameters (name => value)
public java.util.List executeQuery(Query query,
java.lang.Class resultClass,
java.util.Map parameters,
int firstResult,
int maxResults)
query - the queryresultClass - the class to use for the resulting rowsparameters - the parameters (name => value)firstResult - first row in the result set to start atmaxResults - max number of rows to return (0 means all)
public java.util.List executeQuery(Query query,
java.lang.Class resultClass,
java.util.List parameters)
query - the queryresultClass - the class to use for the resulting rowsparameters - the parameters (positional)
public java.util.List executeQuery(Query query,
java.lang.Class resultClass,
java.util.List parameters,
int firstResult,
int maxResults)
query - the queryresultClass - the class to use for the resulting rowsparameters - the parameters (positional)firstResult - first row in the result set to start atmaxResults - max number of rows to return (0 means all)
public java.util.List executeQuery(Query query,
java.lang.Class resultClass)
query - the queryresultClass - the class to use for the resulting rows
public java.util.List executeQuery(Query query,
java.lang.Class resultClass,
int firstResult,
int maxResults)
query - the queryresultClass - the class to use for the resulting rowsfirstResult - first row in the result set to start atmaxResults - max number of rows to return (0 means all)
public java.lang.String getNamedStatement(java.lang.String name)
name - the name to retrieve the query for.
public int executeNamedStatement(java.lang.String statementName,
java.util.Map parameters)
statementName - the name of the statementparameters - the parameters (name => value)
public int executeNamedStatement(java.lang.String statementName,
java.util.List parameters)
statementName - the name of the statementparameters - the parameters (positional)
public int executeStatement(java.lang.String statement,
java.util.Map parameters)
statement - the statement SQLparameters - the parameters (name => value)
public int executeStatement(java.lang.String statement,
java.util.List parameters)
statement - the statement SQLparameters - the parameters (positional)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||