use of org.finos.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(EntitySearchOptions.DEFAULT_SEARCH_RESULTS_LIMIT).searchQuery("sap").build();
List<Application> results = appSearch.searchFullText(dsl, searchOptions);
results.stream().filter(a -> a.entityLifecycleStatus() != EntityLifecycleStatus.REMOVED).forEach(a -> System.out.println(a.name() + " - " + a.lifecyclePhase()));
}
use of org.finos.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().searchFullText(dsl, EntitySearchOptions.mkForEntity(EntityKind.APPLICATION, "Water & Vole"));
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));
//
}
Aggregations