@Override
	public CommerceNotificationQueueEntry[] findByLtS_PrevAndNext(
		long commerceNotificationQueueEntryId, Date sentDate,
		OrderByComparator<CommerceNotificationQueueEntry> orderByComparator)
		throws NoSuchNotificationQueueEntryException {
		CommerceNotificationQueueEntry commerceNotificationQueueEntry = findByPrimaryKey(commerceNotificationQueueEntryId);

		Session session = null;

		try {
			session = openSession();

			CommerceNotificationQueueEntry[] array = new CommerceNotificationQueueEntryImpl[3];

			array[0] = getByLtS_PrevAndNext(session,
					commerceNotificationQueueEntry, sentDate,
					orderByComparator, true);

			array[1] = commerceNotificationQueueEntry;

			array[2] = getByLtS_PrevAndNext(session,
					commerceNotificationQueueEntry, sentDate,
					orderByComparator, false);

			return array;
		}
		catch (Exception e) {
			throw processException(e);
		}
		finally {
			closeSession(session);
		}
	}
@ Override public CommerceNotificationQueueEntry [ ] findByLtS_PrevAndNext ( long commerceNotificationQueueEntryId , Date sentDate , OrderByComparator < CommerceNotificationQueueEntry > orderByComparator ) throws NoSuchNotificationQueueEntryException { CommerceNotificationQueueEntry commerceNotificationQueueEntry = findByPrimaryKey ( commerceNotificationQueueEntryId ) ; Session session = null ; try { session = openSession ( ) ; CommerceNotificationQueueEntry [ ] array = new CommerceNotificationQueueEntryImpl [ 3 ] ; array [ 0 ] = getByLtS_PrevAndNext ( session , commerceNotificationQueueEntry , sentDate , orderByComparator , true ) ; array [ 1 ] = commerceNotificationQueueEntry ; array [ 2 ] = getByLtS_PrevAndNext ( session , commerceNotificationQueueEntry , sentDate , orderByComparator , false ) ; return array ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; } }
Returns the commerce notification queue entries before and after the current commerce notification queue entry in the ordered set where sentDate &lt; &#63;.

@param commerceNotificationQueueEntryId the primary key of the current commerce notification queue entry
@param sentDate the sent date
@param orderByComparator the comparator to order the set by (optionally <code>null</code>)
@return the previous, current, and next commerce notification queue entry
@throws NoSuchNotificationQueueEntryException if a commerce notification queue entry with the primary key could not be found