use of org.activiti.engine.impl.db.IdBlock in project Activiti by Activiti.
the class GetNextIdBlockCmd method execute.
public IdBlock execute(CommandContext commandContext) {
PropertyEntity property = (PropertyEntity) commandContext.getPropertyEntityManager().findPropertyById("next.dbid");
long oldValue = Long.parseLong(property.getValue());
long newValue = oldValue + idBlockSize;
property.setValue(Long.toString(newValue));
return new IdBlock(oldValue, newValue - 1);
}
Aggregations