use of com.khartec.waltz.schema.tables.records.AssetCostRecord in project waltz by khartec.
the class AssetCostGenerator method main.
public static void main(String[] args) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
ApplicationService applicationService = ctx.getBean(ApplicationService.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
List<AssetCostRecord> appDevCosts = generateRecords(applicationService, "APPLICATION_DEVELOPMENT", 100_0000);
List<AssetCostRecord> infraCosts = generateRecords(applicationService, "INFRASTRUCTURE", 5_000);
dsl.deleteFrom(ASSET_COST).where(ASSET_COST.YEAR.eq(year)).and(ASSET_COST.PROVENANCE.eq(provenance)).execute();
dsl.batchInsert(appDevCosts).execute();
dsl.batchInsert(infraCosts).execute();
}
Aggregations