@Override
	public CommerceShipmentItem[] findByCommerceShipment_PrevAndNext(
		long commerceShipmentItemId, long commerceShipmentId,
		OrderByComparator<CommerceShipmentItem> orderByComparator)
		throws NoSuchShipmentItemException {
		CommerceShipmentItem commerceShipmentItem = findByPrimaryKey(commerceShipmentItemId);

		Session session = null;

		try {
			session = openSession();

			CommerceShipmentItem[] array = new CommerceShipmentItemImpl[3];

			array[0] = getByCommerceShipment_PrevAndNext(session,
					commerceShipmentItem, commerceShipmentId,
					orderByComparator, true);

			array[1] = commerceShipmentItem;

			array[2] = getByCommerceShipment_PrevAndNext(session,
					commerceShipmentItem, commerceShipmentId,
					orderByComparator, false);

			return array;
		}
		catch (Exception e) {
			throw processException(e);
		}
		finally {
			closeSession(session);
		}
	}
@ Override public CommerceShipmentItem [ ] findByCommerceShipment_PrevAndNext ( long commerceShipmentItemId , long commerceShipmentId , OrderByComparator < CommerceShipmentItem > orderByComparator ) throws NoSuchShipmentItemException { CommerceShipmentItem commerceShipmentItem = findByPrimaryKey ( commerceShipmentItemId ) ; Session session = null ; try { session = openSession ( ) ; CommerceShipmentItem [ ] array = new CommerceShipmentItemImpl [ 3 ] ; array [ 0 ] = getByCommerceShipment_PrevAndNext ( session , commerceShipmentItem , commerceShipmentId , orderByComparator , true ) ; array [ 1 ] = commerceShipmentItem ; array [ 2 ] = getByCommerceShipment_PrevAndNext ( session , commerceShipmentItem , commerceShipmentId , orderByComparator , false ) ; return array ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; } }
Returns the commerce shipment items before and after the current commerce shipment item in the ordered set where commerceShipmentId = &#63;.

@param commerceShipmentItemId the primary key of the current commerce shipment item
@param commerceShipmentId the commerce shipment ID
@param orderByComparator the comparator to order the set by (optionally <code>null</code>)
@return the previous, current, and next commerce shipment item
@throws NoSuchShipmentItemException if a commerce shipment item with the primary key could not be found