|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A PersistentFactory is a class that generates new Persistent objects, Transactions, and Queries.
| Field Summary | |
static java.lang.String |
ROLE |
| Method Summary | |
void |
addInputs(ModelResponse res, Persistent p)Convenience method to add an Input ResponseElement to the specified ModelResponse for every field in the supplied Persistent. |
void |
addOutputs(ModelResponse res, Persistent p)Convenience method to add an Output ResponseElement to the specified ModelResponse for every field in the supplied Persistent. |
void |
addQuery(ModelResponse res, Persistent p, java.lang.String outputName)Convenience method to add a List of nested Output ResponseElements to the specified ModelRepsonse. |
void |
addQuery(ModelResponse res, Persistent p, java.lang.String outputName, java.lang.String[] fieldNames)Convenience method to add a List of nested Output ResponseElements to the specified ModelRepsonse. |
Transaction |
begin()Begin a new transaction and pass the transaction back to the caller. |
Persistent |
create(java.lang.String name)Create a new persistent object with the specified name. |
Persistent |
create(java.lang.String name, Transaction trx)Create a new Persistent which participates in a transaction. |
void |
createTables()Initialize all schemas defined in this persistent factory, creating all tables as required. |
void |
createTables(java.lang.String schemaName)Initialize the specified schema, creating all tables as required. |
PersistentFactory |
getFactory(java.lang.String factoryName)A convenience method which gets another factory (other than the current one). |
java.lang.String |
getName()A different factory is used to talk to each different database that the application requires. |
java.util.Set |
getPersistents(java.lang.String schemaName)Return a list of the names of all persistent object in the specified schema. |
Configuration |
getSchemaConfiguration(java.lang.String schemaName)Get the Configuration object for the specified schema, if this schema is defined in this PersistentFactory |
java.lang.String |
getSchemaDescription(java.lang.String schemaName)Get the human-readable description of the specified schema |
java.util.Set |
getSchemas()Return a set of Schema names this factory knows about. |
java.lang.String |
getSecurity()Return the name of an another persistent factory where we find the definitions of the Keel security persistent objects. |
| Field Detail |
public static final java.lang.String ROLE
| Method Detail |
public Persistent create(java.lang.String name)
throws PersistenceException
PersistenceException
public Persistent create(java.lang.String name,
Transaction trx)
throws PersistenceException
PersistenceException
public Transaction begin()
throws PersistenceException
PersistenceExceptionpublic java.lang.String getName()
public void createTables(java.lang.String schemaName)
throws PersistenceException
PersistenceException
public void createTables()
throws PersistenceException
PersistenceExceptionpublic java.util.Set getSchemas()
public java.lang.String getSchemaDescription(java.lang.String schemaName)
schemaName - The name of the schemapublic Configuration getSchemaConfiguration(java.lang.String schemaName)
schemaName - The name of the schema to retrieve configuration forPersistenceException - If a parameter error is made (e.g. null schema name), or an error occurrs retrieving the specified schema's configuration
public java.util.Set getPersistents(java.lang.String schemaName)
throws PersistenceException
PersistenceException
public void addInputs(ModelResponse res,
Persistent p)
throws PersistenceException,
ModelException
res - A ModelResponse objectp - A persistent to be used to create InputsPersistenceException - If a problem occurs retrieving the fieldsModelException - If a problem occurs creating the Inputs
public void addOutputs(ModelResponse res,
Persistent p)
throws PersistenceException,
ModelException
res - A ModelResponse objectp - A persistent to be used to create OutputsPersistenceException - If an exception occurs retrieving the fieldsModelException - If an exception occurs creating the outputs.
public void addQuery(ModelResponse res,
Persistent p,
java.lang.String outputName)
throws PersistenceException,
ModelException
res - A ModelResponse objectp - A persistent to be used to create OutputsoutputName - Name of Output ResponseElement to add the List to.PersistenceException - If an exception occurs retrieving the fieldsModelException - If an exception occurs creating the outputs.#addOutputs(ModelReponse, Persistent)
public void addQuery(ModelResponse res,
Persistent p,
java.lang.String outputName,
java.lang.String[] fieldNames)
throws PersistenceException,
ModelException
res - A ModelResponse objectp - A persistent to be used to create OutputsoutputName - Name of Output ResponseElement to add the List to.fieldNames - The fields to be added to the Output. Fields will be added in the same order as in the list.PersistenceException - If an exception occurs retrieving the fieldsModelException - If an exception occurs creating the outputs.#addOutputs(ModelReponse, Persistent)public java.lang.String getSecurity()
public PersistentFactory getFactory(java.lang.String factoryName)
throws PersistenceException
factoryName - The name of the factory being requestedPersistenceException - If the factory cannot be initialized, or there is no such factory configured
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||