protected EntityContext(TransactionManager transactionManager, SecurityService securityService, UserTransaction userTransaction) {
super(transactionManager, securityService, userTransaction);
}
protected State getState() {
Operation operation = ThreadContext.getThreadContext().getCurrentOperation();
State state = states[operation.ordinal()];
if (state == null) throw new IllegalArgumentException("Invalid operation " + operation + " for this context");
return state;
}