code: @Override
  	public CommerceDiscountRule[] findByCommerceDiscountId_PrevAndNext(
  		long commerceDiscountRuleId, long commerceDiscountId,
  		OrderByComparator<CommerceDiscountRule> orderByComparator)
  		throws NoSuchDiscountRuleException {
  		CommerceDiscountRule commerceDiscountRule = findByPrimaryKey(commerceDiscountRuleId);
  
  		Session session = null;
  
  		try {
  			session = openSession();
  
  			CommerceDiscountRule[] array = new CommerceDiscountRuleImpl[3];
  
  			array[0] = getByCommerceDiscountId_PrevAndNext(session,
  					commerceDiscountRule, commerceDiscountId,
  					orderByComparator, true);
  
  			array[1] = commerceDiscountRule;
  
  			array[2] = getByCommerceDiscountId_PrevAndNext(session,
  					commerceDiscountRule, commerceDiscountId,
  					orderByComparator, false);
  
  			return array;
  		}
  		catch (Exception e) {
  			throw processException(e);
  		}
  		finally {
  			closeSession(session);
  		}
  	}
docs: Returns the commerce discount rules before and after the current commerce discount rule in the ordered set where commerceDiscountId = &#63;.
  
  @param commerceDiscountRuleId the primary key of the current commerce discount rule
  @param commerceDiscountId the commerce discount ID
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the previous, current, and next commerce discount rule
  @throws NoSuchDiscountRuleException if a commerce discount rule with the primary key could not be found