@Override
	public CPDefinition findByCompanyId_First(long companyId,
		OrderByComparator<CPDefinition> orderByComparator)
		throws NoSuchCPDefinitionException {
		CPDefinition cpDefinition = fetchByCompanyId_First(companyId,
				orderByComparator);

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

		StringBundler msg = new StringBundler(4);

		msg.append(_NO_SUCH_ENTITY_WITH_KEY);

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

		msg.append("}");

		throw new NoSuchCPDefinitionException(msg.toString());
	}
@ Override public CPDefinition findByCompanyId_First ( long companyId , OrderByComparator < CPDefinition > orderByComparator ) throws NoSuchCPDefinitionException { CPDefinition cpDefinition = fetchByCompanyId_First ( companyId , orderByComparator ) ; if ( cpDefinition != null ) { return cpDefinition ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "companyId=" ) ; msg . append ( companyId ) ; msg . append ( "}" ) ; throw new NoSuchCPDefinitionException ( msg . toString ( ) ) ; }
Returns the first cp definition 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 first matching cp definition
@throws NoSuchCPDefinitionException if a matching cp definition could not be found