class EsperStatement implements EsperStatementOperations {

	public <T> T concurrentUnsafeQueryForObject(
			ParameterizedEsperRowMapper<T> rm) {
		LOG.info("Concurrent unsafe query for object being executed");

		if (epStatement.isStopped() || epStatement.isDestroyed()) {
			LOG
					.error("Concurrent unsafe query for object was attempted when the statement was stopped or destroyed");
			throw new EsperStatementInvalidStateException(
					"Attempted to execute a concurrent unsafe query for object when esper statement resource had state of "
							+ epStatement.getState());
		}

		Iterator<EventBean> safeIter = this.epStatement.iterator();

		T result = null;

		// Only retrieve the last result
		while (safeIter.hasNext()) {
			EventBean event = safeIter.next();
			if (!safeIter.hasNext()) {
				result = rm.mapRow(event);
			}

		}

		LOG.info("Concurrent unsafe query for object was completed");
		return result;
	}

	public  EsperStatement(String epl);
	public  EsperStatement(String id, String epl);

}