WriteTransaction#
- public class WriteTransaction extends Transaction<WritableContainer> implements WriteTransactionInterface#
This class is responsible for inserting, updating and deleting entities which are held in the
TransactionContainer.This class initializes and runs the
ScheduleofJobs, calls theBackendTransactions for each entity, and handles exceptions, roll-back (if necessary) and clean up afterwards.- Author:
Timm Fitschen
Constructors#
WriteTransaction#
- public WriteTransaction(WritableContainer container)#
Methods#
checkPermissions#
- public static void checkPermissions(EntityInterface entity, Set<Permission> permissions)#
Check if the user has all permissions
cleanUp#
- protected final void cleanUp()#
commit#
- protected void commit()#
deriveUpdate#
- public HashSet<Permission> deriveUpdate(EntityInterface newEntity, EntityInterface oldEntity)#
The entity is set to VALID iff there are no updates to be processed. The entity is set to QUALIFIED otherwise.
- Parameters:
newEntity
oldEntity
- Throws:
generateId#
getSRID#
init#
- protected void init()#
logHistory#
- public boolean logHistory()#
postCheck#
- protected void postCheck()#
postTransaction#
- protected void postTransaction()#
preCheck#
- protected void preCheck()#
preTransaction#
- protected final void preTransaction()#
rollBack#
- protected void rollBack()#
setNoIdIsError#
- public void setNoIdIsError(boolean noIdIsError)#
Set if it is an error, if an Entity has no ID but just a name upon update.
transaction#
- protected void transaction()#