use of com.khartec.waltz.data.application.search.SqlServerAppSearch in project waltz by khartec.
the class AppHarness method main.
public static void main(String[] args) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
// Water & Vole
// P&S Blotter
// P & S Gorilla
List<Application> jimmy = new SqlServerAppSearch().search(dsl, "Water & Vole", EntitySearchOptions.mkForEntity(EntityKind.APPLICATION));
System.out.println(jimmy);
// ApplicationService applicationService = ctx.getBean(ApplicationService.class);
// DSLContext dsl = ctx.getBean(DSLContext.class);
//
// List<String> tagList = applicationService.findAllTags();
//
// tagList.forEach(System.out::println);
//
// System.out.println("---------------");
//
// applicationService.findByTag("not-good-at-flying").forEach(a -> System.out.println(a.name()));
//
// System.out.println(applicationService.findTagsForApplication(521L));
//
}
use of com.khartec.waltz.data.application.search.SqlServerAppSearch in project waltz by khartec.
the class MsSqlSearchHarness method main.
public static void main(String[] args) {
ApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
SqlServerAppSearch appSearch = new SqlServerAppSearch();
EntitySearchOptions searchOptions = ImmutableEntitySearchOptions.builder().addEntityKinds(EntityKind.APPLICATION).userId("admin").limit(50).build();
List<Application> results = appSearch.search(dsl, "sap", searchOptions);
results.stream().filter(a -> a.entityLifecycleStatus() != EntityLifecycleStatus.REMOVED).forEach(a -> System.out.println(a.name() + " - " + a.lifecyclePhase()));
}
Aggregations