org.hibernate.annotations.BatchSize Java Examples

The following examples show how to use org.hibernate.annotations.BatchSize. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityBinder.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void setBatchSize(BatchSize sizeAnn) {
	if ( sizeAnn != null ) {
		batchSize = sizeAnn.size();
	}
	else {
		batchSize = -1;
	}
}
 
Example #2
Source File: TaskData.java    From scheduling with GNU Affero General Public License v3.0 5 votes vote down vote up
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "TASK_DATA_DEPENDENCIES", joinColumns = { @JoinColumn(name = "JOB_ID", referencedColumnName = "TASK_ID_JOB"),
                                                                  @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID_TASK") }, indexes = { @Index(name = "TASK_DATA_DEP_JOB_ID", columnList = "JOB_ID"),
                                                                                                                                                      @Index(name = "TASK_DATA_DEP_TASK_ID_JOB_ID", columnList = "TASK_ID,JOB_ID"),
                                                                                                                                                      @Index(name = "TASK_DATA_DEP_TASK_ID", columnList = "TASK_ID"), })
@BatchSize(size = 100)
public List<DBTaskId> getDependentTasks() {
    return dependentTasks;
}
 
Example #3
Source File: TaskData.java    From scheduling with GNU Affero General Public License v3.0 5 votes vote down vote up
@ElementCollection(fetch = FetchType.LAZY)
@CollectionTable(name = "TASK_DATA_JOINED_BRANCHES", joinColumns = { @JoinColumn(name = "JOB_ID", referencedColumnName = "TASK_ID_JOB"),
                                                                     @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID_TASK") }, indexes = { @Index(name = "TASK_DATA_JB_JOB_ID", columnList = "JOB_ID"),
                                                                                                                                                         @Index(name = "TASK_DATA_JB_TASK_ID_JOB_ID", columnList = "TASK_ID,JOB_ID"),
                                                                                                                                                         @Index(name = "TASK_DATA_JB_TASK_ID", columnList = "TASK_ID"), })
@BatchSize(size = 100)
public List<DBTaskId> getJoinedBranches() {
    return joinedBranches;
}
 
Example #4
Source File: JobData.java    From scheduling with GNU Affero General Public License v3.0 5 votes vote down vote up
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "jobData")
@Fetch(FetchMode.SELECT)
@BatchSize(size = 10)
@MapKey(name = "jobId")
@PrimaryKeyJoinColumn(name = "JOB_ID")
public List<JobContent> getJobContent() {
    return jobContent;
}
 
Example #5
Source File: CollectionBinder.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public void setBatchSize(BatchSize batchSize) {
	this.batchSize = batchSize == null ? -1 : batchSize.size();
}