@Override public long count() { this.resultType = ResultType.COUNT; if (commandExecutor != null) { return (Long) commandExecutor.execute(this); } return executeCount(Context.getCommandContext()); }
@Override public long count() { this.resultType = ResultType.COUNT; if (commandExecutor != null) { return (Long) commandExecutor.execute(this); } return executeCount(Context.getCommandContext()); }
@SuppressWarnings("unchecked") @Override public U singleResult() { this.resultType = ResultType.SINGLE_RESULT; if (commandExecutor != null) { return (U) commandExecutor.execute(this); } return executeSingleResult(Context.getCommandContext()); }
@SuppressWarnings("unchecked") @Override public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext()); }
@Override @SuppressWarnings("unchecked") public U singleResult() { this.resultType = ResultType.SINGLE_RESULT; if (commandExecutor != null) { return (U) commandExecutor.execute(this); } return executeSingleResult(Context.getCommandContext()); }
@SuppressWarnings("unchecked") @Override public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext()); }
@Override @SuppressWarnings("unchecked") public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext()); }
@Override @SuppressWarnings("unchecked") public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext()); }
@SuppressWarnings("unchecked") @Override public U singleResult() { this.resultType = ResultType.SINGLE_RESULT; if (commandExecutor != null) { return (U) commandExecutor.execute(this); } return executeSingleResult(Context.getCommandContext()); }
@Override @SuppressWarnings("unchecked") public U singleResult() { this.resultType = ResultType.SINGLE_RESULT; if (commandExecutor != null) { return (U) commandExecutor.execute(this); } return executeSingleResult(Context.getCommandContext()); }
@Override @SuppressWarnings("unchecked") public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext(), generateParameterMap()); }
@Override public long count() { this.resultType = ResultType.COUNT; if (commandExecutor != null) { return (Long) commandExecutor.execute(this); } return executeCount(Context.getCommandContext(), generateParameterMap()); }
@SuppressWarnings("unchecked") @Override public List<U> listPage(int firstResult, int maxResults) { this.firstResult = firstResult; this.maxResults = maxResults; this.resultType = ResultType.LIST_PAGE; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext(), generateParameterMap()); }
@Override @SuppressWarnings("unchecked") public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext(), generateParameterMap()); }
@Override public long count() { this.resultType = ResultType.COUNT; if (commandExecutor != null) { return (Long) commandExecutor.execute(this); } return executeCount(Context.getCommandContext(), generateParameterMap()); }
@SuppressWarnings("unchecked") @Override public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor != null) { return (List<U>) commandExecutor.execute(this); } return executeList(Context.getCommandContext(), generateParameterMap()); }
CommandExecutor commandExecutor = Context.getCommandContext().getCurrentEngineConfiguration().getCommandExecutor(); CommandConfig commandConfig = new CommandConfig(false, TransactionPropagation.REQUIRES_NEW); commandExecutor.execute(commandConfig, new Command<Void>() { @Override public Void execute(CommandContext commandContext) {