code: public static CommerceDiscountUserSegmentRel[] findByCommerceDiscountId_PrevAndNext(
  		long commerceDiscountUserSegmentRelId, long commerceDiscountId,
  		OrderByComparator<CommerceDiscountUserSegmentRel> orderByComparator)
  		throws com.liferay.commerce.discount.exception.NoSuchDiscountUserSegmentRelException {
  		return getPersistence()
  				   .findByCommerceDiscountId_PrevAndNext(commerceDiscountUserSegmentRelId,
  			commerceDiscountId, orderByComparator);
  	}
docs: Returns the commerce discount user segment rels before and after the current commerce discount user segment rel in the ordered set where commerceDiscountId = &#63;.
  
  @param commerceDiscountUserSegmentRelId the primary key of the current commerce discount user segment rel
  @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 user segment rel
  @throws NoSuchDiscountUserSegmentRelException if a commerce discount user segment rel with the primary key could not be found