code: @Override
  	public CPInstance fetchByC_LtD_S_Last(long CPDefinitionId,
  		Date displayDate, int status,
  		OrderByComparator<CPInstance> orderByComparator) {
  		int count = countByC_LtD_S(CPDefinitionId, displayDate, status);
  
  		if (count == 0) {
  			return null;
  		}
  
  		List<CPInstance> list = findByC_LtD_S(CPDefinitionId, displayDate,
  				status, count - 1, count, orderByComparator);
  
  		if (!list.isEmpty()) {
  			return list.get(0);
  		}
  
  		return null;
  	}
docs: Returns the last cp instance in the ordered set where CPDefinitionId = &#63; and displayDate &lt; &#63; and status = &#63;.
  
  @param CPDefinitionId the cp definition ID
  @param displayDate the display date
  @param status the status
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the last matching cp instance, or <code>null</code> if a matching cp instance could not be found