code: @Override
  	public CPDefinition[] findByC_S_PrevAndNext(long CPDefinitionId,
  		long CProductId, int status,
  		OrderByComparator<CPDefinition> orderByComparator)
  		throws NoSuchCPDefinitionException {
  		CPDefinition cpDefinition = findByPrimaryKey(CPDefinitionId);
  
  		Session session = null;
  
  		try {
  			session = openSession();
  
  			CPDefinition[] array = new CPDefinitionImpl[3];
  
  			array[0] = getByC_S_PrevAndNext(session, cpDefinition, CProductId,
  					status, orderByComparator, true);
  
  			array[1] = cpDefinition;
  
  			array[2] = getByC_S_PrevAndNext(session, cpDefinition, CProductId,
  					status, orderByComparator, false);
  
  			return array;
  		}
  		catch (Exception e) {
  			throw processException(e);
  		}
  		finally {
  			closeSession(session);
  		}
  	}
docs: Returns the cp definitions before and after the current cp definition in the ordered set where CProductId = &#63; and status = &#63;.
  
  @param CPDefinitionId the primary key of the current cp definition
  @param CProductId the c product ID
  @param status the status
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the previous, current, and next cp definition
  @throws NoSuchCPDefinitionException if a cp definition with the primary key could not be found