Interface EntityFilter

All Known Implementing Classes:
AbstractEntityFilter, CalendarByEventIdFilter, CalendarEventByCalendarFilter, CalendarParentFilter, CompoundFilter, ConflictEventFilter, ConflictForCalendarEventFilter, ConflictForCalendarEventIdFilter, ConflictForTargetEntitiesFilter, ConflictUniqueFilter, DefaultCalendarFilter, OfftimeCalendarFilter, RangeAlldayFilter, RangeCalendarEventFilter, RecurringEventFilter, RelatedEntitiesCalendarEventFilter, RelationExistsFilter, RelationExistsInBusinessUnitFilter, RelationNotExistsFilter, TargetEventFilter

public interface EntityFilter

Filters by appending more constraints on a query.

This is built on top of the QueryBuilder api and is intended to be able to create reusable query parts that can be concatenated. Thus implementations of this class hide the complexity of creating a query in a separate class.

Usage example:


     EntityFilter f1 = new RolesTypeFilter(true); // does: field(manual).is(true)
     EntityFilter f = f1.and(new RelationExistsFilter("relPrincipal"); // does: and().exists("relPrincipal");
     QueryStatements.Statement stmt = queryBuilderFactory.build("Role");
     f.appendQuery(stmt);
     String queryString = stmt.toNativeQuery(); //=> field(manual).is(true).and().exists("relPrincipal")
 

See RangeCalendarEventFilter for a more complex example.

  • Method Details

    • appendQuery

      Condition appendQuery(String entityModel)
      Append to the partial query and return the "next query step". Return null, to not contribute to the query. This filter is then discarded.
      Parameters:
      entityModel - the entity model the query is for
    • and

    • or