}
/** */
void applyOperation(int operation, StateTransitionObj stobj)
{
StateTransitionObj obj = (StateTransitionObj) stobj;
switch( operation ){
case MAKEPERSISTENT:
{
pm.makePersistent(obj);
break;
}
case DELETEPERSISTENT:
{
pm.deletePersistent(obj);
break;
}
case MAKETRANSACTIONAL:
{
pm.makeTransactional(obj);
break;
}
case MAKENONTRANSACTIONAL:
{
pm.makeNontransactional(obj);
break;
}
case MAKETRANSIENT:
{
pm.makeTransient(obj);
break;
}
case COMMITNORETAINVALUES:
{
pm.currentTransaction().commit();
break;
}
case COMMITRETAINVALUES:
{
pm.currentTransaction().commit();
break;
}
case ROLLBACKNORESTOREVALUES:
{
pm.currentTransaction().rollback();
break;
}
case ROLLBACKRESTOREVALUES:
{
pm.currentTransaction().rollback();
break;
}
case REFRESHDATASTORE:
{
pm.refresh(obj);
break;
}
case REFRESHOPTIMISTIC:
{
pm.refresh(obj);
break;
}
case EVICT:
{
pm.evict(obj);
break;
}
case READOUTSIDETX:
{
obj.readField();
break;
}
case READOPTIMISTIC:
{
obj.readField();
break;
}
case READDATASTORE:
{
obj.readField();
break;
}
case WRITEOUTSIDETX:
{
obj.writeField(42);
break;
}
case WRITEINSIDETX:
{
obj.writeField(42);
break;
}
case RETRIEVEOUTSIDETX:
{
pm.retrieve(obj);