Search in sources :

Example 1 with ChangeInitiativeRecord

use of com.khartec.waltz.schema.tables.records.ChangeInitiativeRecord in project waltz by khartec.

the class ChangeInitiativeGenerator method buildChangeInitiativeRecord.

private static ChangeInitiativeRecord buildChangeInitiativeRecord(Tuple3<Long, String, Long> t) {
    Date.from(Instant.now());
    ChangeInitiativeRecord record = new ChangeInitiativeRecord();
    record.setDescription(t.v2);
    record.setName(t.v2);
    record.setProvenance("dummy");
    record.setExternalId("EXT" + t.v1);
    record.setKind("PROGRAMME");
    record.setLifecyclePhase(randomPick(LifecyclePhase.values()).name());
    record.setId(t.v1);
    record.setStartDate(new Date(Instant.now().toEpochMilli()));
    record.setOrganisationalUnitId(t.v3);
    record.setEndDate(new Date(Instant.now().plusSeconds(rnd.nextInt(60 * 60 * 24 * 365 * 2)).toEpochMilli()));
    return record;
}
Also used : ChangeInitiativeRecord(com.khartec.waltz.schema.tables.records.ChangeInitiativeRecord) Date(java.sql.Date)

Aggregations

ChangeInitiativeRecord (com.khartec.waltz.schema.tables.records.ChangeInitiativeRecord)1 Date (java.sql.Date)1