public List<EventLogEntry> list(QueryRunner queryRunner, EventLogFilters filters) {
    SelectQuery select = QueryFactory.selectAll().from(config.entityName());

    if (filters.parameterKey() != null) {
      select
          .where("parameter_key = :parameterKey")
          .withArgument("parameterKey", filters.parameterKey().value());
    }
    if (filters.entryKey() != null) {
      select
          .where("parameter_entry_key = :parameterEntryKey")
          .withArgument("parameterEntryKey", filters.entryKey().value());
    }

    return queryRunner.queryList(select, new EventLogEntryMapper());
  }
Ejemplo n.º 2
0
 @Override
 void addWhere(SelectQuery query) {
   query.where(SNAPSHOT_PK + " = " + snapshotPK);
 }