@Override
	public CommerceDiscountRule findByCommerceDiscountId_First(
		long commerceDiscountId,
		OrderByComparator<CommerceDiscountRule> orderByComparator)
		throws NoSuchDiscountRuleException {
		CommerceDiscountRule commerceDiscountRule = fetchByCommerceDiscountId_First(commerceDiscountId,
				orderByComparator);

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

		StringBundler msg = new StringBundler(4);

		msg.append(_NO_SUCH_ENTITY_WITH_KEY);

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

		msg.append("}");

		throw new NoSuchDiscountRuleException(msg.toString());
	}
@ Override public CommerceDiscountRule findByCommerceDiscountId_First ( long commerceDiscountId , OrderByComparator < CommerceDiscountRule > orderByComparator ) throws NoSuchDiscountRuleException { CommerceDiscountRule commerceDiscountRule = fetchByCommerceDiscountId_First ( commerceDiscountId , orderByComparator ) ; if ( commerceDiscountRule != null ) { return commerceDiscountRule ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commerceDiscountId=" ) ; msg . append ( commerceDiscountId ) ; msg . append ( "}" ) ; throw new NoSuchDiscountRuleException ( msg . toString ( ) ) ; }
Returns the first commerce discount rule in the ordered set where commerceDiscountId = &#63;.

@param commerceDiscountId the commerce discount ID
@param orderByComparator the comparator to order the set by (optionally <code>null</code>)
@return the first matching commerce discount rule
@throws NoSuchDiscountRuleException if a matching commerce discount rule could not be found