class TicketAdminServiceImpl extends AbstractTicketService implements TicketAdminService {

	@Override
	public boolean isTicketInUse(final String ticketString) throws JargonException {
		log.info("isTicketInUse()");
		if (ticketString == null || ticketString.isEmpty()) {
			throw new IllegalArgumentException("null or empty ticketString");
		}
		log.info("ticketString:{}", ticketString);

		boolean ticketFound = false;
		try {
			IRODSGenQueryBuilder builder = new IRODSGenQueryBuilder(true, null);
			builder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_TICKET_STRING).addConditionAsGenQueryField(
					RodsGenQueryEnum.COL_TICKET_STRING, QueryConditionOperators.EQUAL, ticketString);
			IRODSGenQueryExecutor irodsGenQueryExecutor = irodsAccessObjectFactory
					.getIRODSGenQueryExecutor(irodsAccount);

			IRODSQueryResultSetInterface resultSet = irodsGenQueryExecutor
					.executeIRODSQueryAndCloseResult(builder.exportIRODSQueryFromBuilder(1), 0);

			if (!resultSet.getResults().isEmpty()) {
				log.info("found the ticket");
				ticketFound = true;
			}

		} catch (GenQueryBuilderException e) {
			log.error("GenQueryBuilderException in ticket query", e);
			throw new JargonException("genQueryBuilderException building ticket query", e);
		} catch (JargonQueryException e) {
			log.error("jargonQueryException in ticket query", e);
			throw new JargonException("jargonQueryException building ticket query", e);
		}
		return ticketFound;
	}

	  TicketAdminServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory, final IRODSAccount irodsAccount);

}