code: public static CPInstance[] findByCompanyId_PrevAndNext(long CPInstanceId,
  		long companyId, OrderByComparator<CPInstance> orderByComparator)
  		throws com.liferay.commerce.product.exception.NoSuchCPInstanceException {
  		return getPersistence()
  				   .findByCompanyId_PrevAndNext(CPInstanceId, companyId,
  			orderByComparator);
  	}
docs: Returns the cp instances before and after the current cp instance in the ordered set where companyId = &#63;.
  
  @param CPInstanceId the primary key of the current cp instance
  @param companyId the company ID
  @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
  @return the previous, current, and next cp instance
  @throws NoSuchCPInstanceException if a cp instance with the primary key could not be found