Inherits de::zib::gndms::logic::model::DefaultTaskAction< O >.
List of all members.
Public Member Functions |
| ModelTaskAction (final Class< O > orderClass) |
DirectoryAux | getDirectoryAux () |
void | setDirectoryAux (final DirectoryAux directoryAux) |
Package Functions |
protected< M > M | getModelEntity (final Class< M > modelClass) |
| Delivers the model for the id given in the order object.
|
protected< M > M | getEntity (final Class< M > modelClass, final String modelId) |
| Loades an entity from the database.
|
protected< M > void | deleteModelEntity (final Class< M > modelClass) |
| Deletes the model-entity, whose id given in the order.
|
protected< M > void | deleteEntity (final Class< M > modelClass, final String modelId) |
| Deletes an entity from the database.
|
Private Attributes |
DirectoryAux | directoryAux |
Detailed Description
- Author:
- Maik Jorra jorra@zib.de
- Date:
- 22.12.11 16:57
Member Function Documentation
protected<M> void de.zib.gndms.logic.model.ModelTaskAction< O extends ModelIdHoldingOrder >.deleteEntity |
( |
final Class< M > |
modelClass, |
|
|
final String |
modelId |
|
) |
| [package] |
Deletes an entity from the database.
- Parameters:
-
modelClass | The class of the entity, required for the look-up |
modelId | The id, i.e. primary key, of the entity. |
{
M model;
EntityManager em = getEmf().createEntityManager();
TxFrame tx = new TxFrame( em );
try{
model = em.find( modelClass, modelId );
em.remove( model );
tx.commit();
} finally {
tx.finish();
}
}
protected<M> void de.zib.gndms.logic.model.ModelTaskAction< O extends ModelIdHoldingOrder >.deleteModelEntity |
( |
final Class< M > |
modelClass | ) |
[package] |
Deletes the model-entity, whose id given in the order.
ensuredOrder must have been called.
- Parameters:
-
modelClass | the model class... |
- Returns:
- The entity referenced by
protected<M> M de.zib.gndms.logic.model.ModelTaskAction< O extends ModelIdHoldingOrder >.getEntity |
( |
final Class< M > |
modelClass, |
|
|
final String |
modelId |
|
) |
| [package] |
Loades an entity from the database.
- Parameters:
-
modelClass | The class of the entity. |
modelId | The id, i.e. primary key, of the entity. |
- Returns:
- The entity instance, in detached state.
{
M model;
EntityManager em = getEmf().createEntityManager();
TxFrame tx = new TxFrame( em );
try{
model = em.find( modelClass, modelId );
tx.commit();
} finally {
tx.finish();
}
return model;
}
protected<M> M de.zib.gndms.logic.model.ModelTaskAction< O extends ModelIdHoldingOrder >.getModelEntity |
( |
final Class< M > |
modelClass | ) |
[package] |
Delivers the model for the id given in the order object.
ensuredOrder must have been called.
- Parameters:
-
modelClass | the model calls... |
- Returns:
- The entity referenced by
{
return getEntity( modelClass, getOrder().getModelId() );
}
The documentation for this class was generated from the following file:
- logic/src/de/zib/gndms/logic/model/ModelTaskAction.java