ee.telekom.workflow.facade.util.SqlUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of workflow-engine Show documentation
Show all versions of workflow-engine Show documentation
Telekom-workflow-engine core provides the runtime environment for workflow execution together with all the supporting services (clustering, persistence, error handling etc).
package ee.telekom.workflow.facade.util;
import java.util.ArrayList;
import java.util.List;
public class SqlUtil{
public static List> partition( List all, int partitionSize ){
List> partitions = new ArrayList<>();
final int count = all.size();
for( int i = 0; i < count; i += partitionSize ){
partitions.add( new ArrayList<>( all.subList( i, Math.min( count, i + partitionSize ) ) ) );
}
return partitions;
}
}