@Override
	public CPInstance fetchByC_NotST_First(long CPDefinitionId, int status,
		OrderByComparator<CPInstance> orderByComparator) {
		List<CPInstance> list = findByC_NotST(CPDefinitionId, status, 0, 1,
				orderByComparator);

		if (!list.isEmpty()) {
			return list.get(0);
		}

		return null;
	}
@ Override public CPInstance fetchByC_NotST_First ( long CPDefinitionId , int status , OrderByComparator < CPInstance > orderByComparator ) { List < CPInstance > list = findByC_NotST ( CPDefinitionId , status , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; }
Returns the first cp instance in the ordered set where CPDefinitionId = &#63; and status &ne; &#63;.

@param CPDefinitionId the cp definition ID
@param status the status
@param orderByComparator the comparator to order the set by (optionally <code>null</code>)
@return the first matching cp instance, or <code>null</code> if a matching cp instance could not be found