@Override
	public CPInstance findByCompanyId_Last(long companyId,
		OrderByComparator<CPInstance> orderByComparator)
		throws NoSuchCPInstanceException {
		CPInstance cpInstance = fetchByCompanyId_Last(companyId,
				orderByComparator);

		if (cpInstance != null) {
			return cpInstance;
		}

		StringBundler msg = new StringBundler(4);

		msg.append(_NO_SUCH_ENTITY_WITH_KEY);

		msg.append("companyId=");
		msg.append(companyId);

		msg.append("}");

		throw new NoSuchCPInstanceException(msg.toString());
	}
@ Override public CPInstance findByCompanyId_Last ( long companyId , OrderByComparator < CPInstance > orderByComparator ) throws NoSuchCPInstanceException { CPInstance cpInstance = fetchByCompanyId_Last ( companyId , orderByComparator ) ; if ( cpInstance != null ) { return cpInstance ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "companyId=" ) ; msg . append ( companyId ) ; msg . append ( "}" ) ; throw new NoSuchCPInstanceException ( msg . toString ( ) ) ; }
Returns the last cp instance in the ordered set where companyId = &#63;.

@param companyId the company ID
@param orderByComparator the comparator to order the set by (optionally <code>null</code>)
@return the last matching cp instance
@throws NoSuchCPInstanceException if a matching cp instance could not be found