persistentGrantContract = persistentSupport.getIPersistentGrantContract();
IPersistentGrantContract persistentGrantContract = new GrantContractVO();
	public Object[] run(InfoSpanByCriteriaListGrantContract infoSpanByCriteriaListGrantOwner)			throws FenixServiceException, ExcepcaoPersistencia {		// Read the grant contracts ordered by persistentSupportan		List grantContractBySpanAndCriteria = null;		IPersistentGrantContract persistentGrantContract = null;		persistentGrantContract = persistentSupport.getIPersistentGrantContract();		grantContractBySpanAndCriteria = persistentGrantContract.readAllContractsByCriteria(				propertyOrderBy(infoSpanByCriteriaListGrantOwner.getOrderBy()),				infoSpanByCriteriaListGrantOwner.getJustActiveContract(),				infoSpanByCriteriaListGrantOwner.getJustDesactiveContract(),				infoSpanByCriteriaListGrantOwner.getBeginContract(), infoSpanByCriteriaListGrantOwner						.getEndContract(), infoSpanByCriteriaListGrantOwner.getSpanNumber(),				SessionConstants.NUMBER_OF_ELEMENTS_IN_SPAN, infoSpanByCriteriaListGrantOwner						.getGrantTypeId());		List listGrantContract = null;		if (grantContractBySpanAndCriteria != null && grantContractBySpanAndCriteria.size() != 0) {			/*			 * Construct the info list and add to the result.			 */			listGrantContract = new ArrayList();			for (int i = 0; i < grantContractBySpanAndCriteria.size(); i++) {				GrantContract grantContract = (GrantContract) grantContractBySpanAndCriteria.get(i);				convertToInfoListGrantOwnerByOrder(grantContract, infoSpanByCriteriaListGrantOwner, listGrantContract);			}		}		if (infoSpanByCriteriaListGrantOwner.getTotalElements() == null) {			// Setting the search attributes			infoSpanByCriteriaListGrantOwner.setTotalElements(persistentGrantContract					.countAllByCriteria(infoSpanByCriteriaListGrantOwner.getJustActiveContract(),							infoSpanByCriteriaListGrantOwner.getJustDesactiveContract(),							infoSpanByCriteriaListGrantOwner.getBeginContract(),							infoSpanByCriteriaListGrantOwner.getEndContract(),							infoSpanByCriteriaListGrantOwner.getGrantTypeId()));		}		Object[] result = { listGrantContract, infoSpanByCriteriaListGrantOwner };		return result;	}