use of org.jooq.InsertValuesStep12 in project hmftools by hartwigmedical.
the class CopyNumberDAO method writeGermlineCopyNumber.
void writeGermlineCopyNumber(@NotNull final String sample, @NotNull List<PurpleCopyNumber> copyNumbers) {
Timestamp timestamp = new Timestamp(new Date().getTime());
context.delete(COPYNUMBERGERMLINE).where(COPYNUMBERGERMLINE.SAMPLEID.eq(sample)).execute();
for (List<PurpleCopyNumber> splitCopyNumbers : Iterables.partition(copyNumbers, DB_BATCH_INSERT_SIZE)) {
InsertValuesStep12 inserter = context.insertInto(COPYNUMBERGERMLINE, COPYNUMBERGERMLINE.SAMPLEID, COPYNUMBERGERMLINE.CHROMOSOME, COPYNUMBERGERMLINE.START, COPYNUMBERGERMLINE.END, COPYNUMBERGERMLINE.COPYNUMBERMETHOD, COPYNUMBERGERMLINE.SEGMENTSTARTSUPPORT, COPYNUMBERGERMLINE.SEGMENTENDSUPPORT, COPYNUMBERGERMLINE.BAFCOUNT, COPYNUMBERGERMLINE.OBSERVEDBAF, COPYNUMBERGERMLINE.ACTUALBAF, COPYNUMBERGERMLINE.COPYNUMBER, COPYNUMBERGERMLINE.MODIFIED);
splitCopyNumbers.forEach(x -> addCopynumberRecord(timestamp, inserter, sample, x));
inserter.execute();
}
}
use of org.jooq.InsertValuesStep12 in project hmftools by hartwigmedical.
the class CopyNumberDAO method writeCopyNumber.
void writeCopyNumber(@NotNull final String sample, @NotNull List<PurpleCopyNumber> copyNumbers) {
Timestamp timestamp = new Timestamp(new Date().getTime());
context.delete(COPYNUMBER).where(COPYNUMBER.SAMPLEID.eq(sample)).execute();
for (List<PurpleCopyNumber> splitCopyNumbers : Iterables.partition(copyNumbers, DB_BATCH_INSERT_SIZE)) {
InsertValuesStep12 inserter = context.insertInto(COPYNUMBER, COPYNUMBER.SAMPLEID, COPYNUMBER.CHROMOSOME, COPYNUMBER.START, COPYNUMBER.END, COPYNUMBER.COPYNUMBERMETHOD, COPYNUMBER.SEGMENTSTARTSUPPORT, COPYNUMBER.SEGMENTENDSUPPORT, COPYNUMBER.BAFCOUNT, COPYNUMBER.OBSERVEDBAF, COPYNUMBER.ACTUALBAF, COPYNUMBER.COPYNUMBER_, COPYNUMBER.MODIFIED);
splitCopyNumbers.forEach(x -> addCopynumberRecord(timestamp, inserter, sample, x));
inserter.execute();
}
}
Aggregations