code: @Override
  	public CPOptionCategory[] findByGroupId_PrevAndNext(
  		long CPOptionCategoryId, long groupId,
  		OrderByComparator<CPOptionCategory> orderByComparator)
  		throws NoSuchCPOptionCategoryException {
  		CPOptionCategory cpOptionCategory = findByPrimaryKey(CPOptionCategoryId);
  
  		Session session = null;
  
  		try {
  			session = openSession();
  
  			CPOptionCategory[] array = new CPOptionCategoryImpl[3];
  
  			array[0] = getByGroupId_PrevAndNext(session, cpOptionCategory,
  					groupId, orderByComparator, true);
  
  			array[1] = cpOptionCategory;
  
  			array[2] = getByGroupId_PrevAndNext(session, cpOptionCategory,
  					groupId, orderByComparator, false);
  
  			return array;
  		}
  		catch (Exception e) {
  			throw processException(e);
  		}
  		finally {
  			closeSession(session);
  		}
  	}
docs: Returns the cp option categories before and after the current cp option category in the ordered set where groupId = &#63;.
  
  @param CPOptionCategoryId the primary key of the current cp option category
  @param groupId the group ID
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the previous, current, and next cp option category
  @throws NoSuchCPOptionCategoryException if a cp option category with the primary key could not be found