Search in sources :

Example 1 with ServerComplexityService

use of com.khartec.waltz.service.complexity.ServerComplexityService in project waltz by khartec.

the class ServerComplexityHarness method main.

public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    DSLContext dsl = ctx.getBean(DSLContext.class);
    OrganisationalUnitDao ouDao = ctx.getBean(OrganisationalUnitDao.class);
    ServerComplexityService serverService = ctx.getBean(ServerComplexityService.class);
    ComplexityRatingService complexityService = ctx.getBean(ComplexityRatingService.class);
    // EntityReference entityReference = EntityReference.mkRef(EntityKind.PERSON, 1);
    EntityReference entityReference = EntityReference.mkRef(EntityKind.PERSON, 63);
    List<ComplexityRating> complexity = FunctionUtilities.time("complexity", () -> complexityService.findForAppIdSelector(IdSelectionOptions.mkOpts(entityReference, HierarchyQueryScope.CHILDREN)));
}
Also used : OrganisationalUnitDao(com.khartec.waltz.data.orgunit.OrganisationalUnitDao) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) ComplexityRatingService(com.khartec.waltz.service.complexity.ComplexityRatingService) ServerComplexityService(com.khartec.waltz.service.complexity.ServerComplexityService) EntityReference(com.khartec.waltz.model.EntityReference) DSLContext(org.jooq.DSLContext) ComplexityRating(com.khartec.waltz.model.complexity.ComplexityRating)

Aggregations

OrganisationalUnitDao (com.khartec.waltz.data.orgunit.OrganisationalUnitDao)1 EntityReference (com.khartec.waltz.model.EntityReference)1 ComplexityRating (com.khartec.waltz.model.complexity.ComplexityRating)1 ComplexityRatingService (com.khartec.waltz.service.complexity.ComplexityRatingService)1 ServerComplexityService (com.khartec.waltz.service.complexity.ServerComplexityService)1 DSLContext (org.jooq.DSLContext)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1