@Override
	public CPOptionValue findByC_ERC(long companyId,
		String externalReferenceCode) throws NoSuchCPOptionValueException {
		CPOptionValue cpOptionValue = fetchByC_ERC(companyId,
				externalReferenceCode);

		if (cpOptionValue == null) {
			StringBundler msg = new StringBundler(6);

			msg.append(_NO_SUCH_ENTITY_WITH_KEY);

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

			msg.append(", externalReferenceCode=");
			msg.append(externalReferenceCode);

			msg.append("}");

			if (_log.isDebugEnabled()) {
				_log.debug(msg.toString());
			}

			throw new NoSuchCPOptionValueException(msg.toString());
		}

		return cpOptionValue;
	}
@ Override public CPOptionValue findByC_ERC ( long companyId , String externalReferenceCode ) throws NoSuchCPOptionValueException { CPOptionValue cpOptionValue = fetchByC_ERC ( companyId , externalReferenceCode ) ; if ( cpOptionValue == null ) { StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "companyId=" ) ; msg . append ( companyId ) ; msg . append ( ", externalReferenceCode=" ) ; msg . append ( externalReferenceCode ) ; msg . append ( "}" ) ; if ( _log . isDebugEnabled ( ) ) { _log . debug ( msg . toString ( ) ) ; } throw new NoSuchCPOptionValueException ( msg . toString ( ) ) ; } return cpOptionValue ; }
Returns the cp option value where companyId = &#63; and externalReferenceCode = &#63; or throws a {@link NoSuchCPOptionValueException} if it could not be found.

@param companyId the company ID
@param externalReferenceCode the external reference code
@return the matching cp option value
@throws NoSuchCPOptionValueException if a matching cp option value could not be found