@Override
	public CPAttachmentFileEntry[] findByC_C_T_ST_PrevAndNext(
		long CPAttachmentFileEntryId, long classNameId, long classPK, int type,
		int status, OrderByComparator<CPAttachmentFileEntry> orderByComparator)
		throws NoSuchCPAttachmentFileEntryException {
		CPAttachmentFileEntry cpAttachmentFileEntry = findByPrimaryKey(CPAttachmentFileEntryId);

		Session session = null;

		try {
			session = openSession();

			CPAttachmentFileEntry[] array = new CPAttachmentFileEntryImpl[3];

			array[0] = getByC_C_T_ST_PrevAndNext(session,
					cpAttachmentFileEntry, classNameId, classPK, type, status,
					orderByComparator, true);

			array[1] = cpAttachmentFileEntry;

			array[2] = getByC_C_T_ST_PrevAndNext(session,
					cpAttachmentFileEntry, classNameId, classPK, type, status,
					orderByComparator, false);

			return array;
		}
		catch (Exception e) {
			throw processException(e);
		}
		finally {
			closeSession(session);
		}
	}
@ Override public CPAttachmentFileEntry [ ] findByC_C_T_ST_PrevAndNext ( long CPAttachmentFileEntryId , long classNameId , long classPK , int type , int status , OrderByComparator < CPAttachmentFileEntry > orderByComparator ) throws NoSuchCPAttachmentFileEntryException { CPAttachmentFileEntry cpAttachmentFileEntry = findByPrimaryKey ( CPAttachmentFileEntryId ) ; Session session = null ; try { session = openSession ( ) ; CPAttachmentFileEntry [ ] array = new CPAttachmentFileEntryImpl [ 3 ] ; array [ 0 ] = getByC_C_T_ST_PrevAndNext ( session , cpAttachmentFileEntry , classNameId , classPK , type , status , orderByComparator , true ) ; array [ 1 ] = cpAttachmentFileEntry ; array [ 2 ] = getByC_C_T_ST_PrevAndNext ( session , cpAttachmentFileEntry , classNameId , classPK , type , status , orderByComparator , false ) ; return array ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; } }
Returns the cp attachment file entries before and after the current cp attachment file entry in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63; and status = &#63;.

@param CPAttachmentFileEntryId the primary key of the current cp attachment file entry
@param classNameId the class name ID
@param classPK the class pk
@param type the type
@param status the status
@param orderByComparator the comparator to order the set by (optionally <code>null</code>)
@return the previous, current, and next cp attachment file entry
@throws NoSuchCPAttachmentFileEntryException if a cp attachment file entry with the primary key could not be found