transactions
This commit is contained in:
4
TelosysTools/models/InfiniMotion/CommandRollback.entity
Normal file
4
TelosysTools/models/InfiniMotion/CommandRollback.entity
Normal file
@@ -0,0 +1,4 @@
|
||||
#Command
|
||||
@Extends(Command)
|
||||
CommandRollback {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
#Command
|
||||
@Extends(Command)
|
||||
CommandRollbackResponse {
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
#Command
|
||||
CommandWrapper {
|
||||
transaction: string { } ; // Random Transaction ID
|
||||
commit: boolean { @PrimitiveType } ;
|
||||
|
||||
request: string {} ; // Random Request ID
|
||||
type: string {} ; // Command Type
|
||||
payload: binary {} ;
|
||||
|
||||
@@ -22,7 +22,7 @@ ENTITY_PKG=de.infinimotion.model.bean
|
||||
ProjectVariable.MAVEN_ARTIFACT_ID=model
|
||||
ProjectVariable.MAVEN_GROUP_ID=de.infinimotion
|
||||
ProjectVariable.PROJECT_NAME=infinimodel
|
||||
ProjectVariable.PROJECT_VERSION=0.0.44
|
||||
ProjectVariable.PROJECT_VERSION=0.0.54
|
||||
ProjectVariable.REST_SERVER_PORT=3000
|
||||
ProjectVariable.REST_API_ROOT=/api/v1
|
||||
ProjectVariable.REST_URL_ROOT=http://localhost:3000
|
||||
|
||||
@@ -139,6 +139,17 @@ public#if( $entity.isAbstract() ) abstract#end class ${entity.name}#if( $entity.
|
||||
return this;
|
||||
}
|
||||
|
||||
public $entity.name tx(CommandWrapper wrapper) {
|
||||
setTransaction(wrapper.getTransaction());
|
||||
setRequest(java.util.UUID.randomUUID().toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
public $entity.name commit() {
|
||||
setCommit(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ${entity.name}(CommandWrapper wrapper) {
|
||||
this();
|
||||
copyIds(wrapper);
|
||||
|
||||
@@ -146,6 +146,18 @@ public#if( $entity.isAbstract() ) abstract#end class ${entity.name}#if( $entity.
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public $entity.name tx(CommandWrapper wrapper) {
|
||||
setTransaction(wrapper.getTransaction());
|
||||
setRequest(java.util.UUID.randomUUID().toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
public $entity.name commit() {
|
||||
setCommit(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ${entity.name}(CommandWrapper wrapper) {
|
||||
this();
|
||||
copyIds(wrapper);
|
||||
|
||||
Reference in New Issue
Block a user