use of org.finos.waltz.model.change_initiative.ChangeInitiative in project waltz by khartec.
the class FlowDiagramService method makeForChangeInitiative.
private Long makeForChangeInitiative(EntityReference ref, String userId, String providedTitle) {
ChangeInitiative changeInitiative = changeInitiativeDao.getById(ref.id());
String title = isEmpty(providedTitle) ? changeInitiative.name() + " flows" : providedTitle;
return mkNewFlowDiagram(title, userId, newArrayList(mkDiagramEntity(changeInitiative)), emptyList());
}
use of org.finos.waltz.model.change_initiative.ChangeInitiative in project waltz by khartec.
the class ChangeInitiativeSearchDao method search.
@Override
public List<ChangeInitiative> search(EntitySearchOptions options) {
List<String> terms = SearchUtilities.mkTerms(options.searchQuery());
if (terms.isEmpty()) {
return emptyList();
}
Condition nameCondition = JooqUtilities.mkBasicTermSearch(CHANGE_INITIATIVE.NAME, terms);
List<ChangeInitiative> ciViaName = dsl.select(CHANGE_INITIATIVE.fields()).from(CHANGE_INITIATIVE).where(nameCondition).orderBy(CHANGE_INITIATIVE.NAME).limit(options.limit()).fetch(ChangeInitiativeDao.TO_DOMAIN_MAPPER);
List<ChangeInitiative> ciViaFullText = searcher.searchFullText(dsl, options);
return new ArrayList<>(orderedUnion(ciViaName, ciViaFullText));
}
Aggregations