code: @Override
  	public CommerceDiscount[] filterFindByGroupId_PrevAndNext(
  		long commerceDiscountId, long groupId,
  		OrderByComparator<CommerceDiscount> orderByComparator)
  		throws NoSuchDiscountException {
  		if (!InlineSQLHelperUtil.isEnabled(groupId)) {
  			return findByGroupId_PrevAndNext(commerceDiscountId, groupId,
  				orderByComparator);
  		}
  
  		CommerceDiscount commerceDiscount = findByPrimaryKey(commerceDiscountId);
  
  		Session session = null;
  
  		try {
  			session = openSession();
  
  			CommerceDiscount[] array = new CommerceDiscountImpl[3];
  
  			array[0] = filterGetByGroupId_PrevAndNext(session,
  					commerceDiscount, groupId, orderByComparator, true);
  
  			array[1] = commerceDiscount;
  
  			array[2] = filterGetByGroupId_PrevAndNext(session,
  					commerceDiscount, groupId, orderByComparator, false);
  
  			return array;
  		}
  		catch (Exception e) {
  			throw processException(e);
  		}
  		finally {
  			closeSession(session);
  		}
  	}
docs: Returns the commerce discounts before and after the current commerce discount in the ordered set of commerce discounts that the user has permission to view where groupId = &#63;.
  
  @param commerceDiscountId the primary key of the current commerce discount
  @param groupId the group ID
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the previous, current, and next commerce discount
  @throws NoSuchDiscountException if a commerce discount with the primary key could not be found