/** * Query the total count of records. */ default QueryListResult count(CountOptions options) { return count(options, null); }
@Override public Object apply(ActionParams params) { MApiModel am = am(); ModelExecutorContext context = new SimpleModelExecutorContext(api, dao, am, em, params); ModelQueryExecutor executor = newQueryExecutor(context); CountOptions options = getWithoutId(params, 0); QueryListResult result = executor.count(options, null); return ApiResponse.of(result.getCount()); }