use of com.liferay.roster.model.impl.RosterMemberImpl in project liferay-ide by liferay.
the class RosterMemberPersistenceImpl method toUnwrappedModel.
protected RosterMember toUnwrappedModel(RosterMember rosterMember) {
if (rosterMember instanceof RosterMemberImpl) {
return rosterMember;
}
RosterMemberImpl rosterMemberImpl = new RosterMemberImpl();
rosterMemberImpl.setNew(rosterMember.isNew());
rosterMemberImpl.setPrimaryKey(rosterMember.getPrimaryKey());
rosterMemberImpl.setUuid(rosterMember.getUuid());
rosterMemberImpl.setRosterMemberId(rosterMember.getRosterMemberId());
rosterMemberImpl.setCreateDate(rosterMember.getCreateDate());
rosterMemberImpl.setModifiedDate(rosterMember.getModifiedDate());
rosterMemberImpl.setRosterId(rosterMember.getRosterId());
rosterMemberImpl.setContactId(rosterMember.getContactId());
return rosterMemberImpl;
}
use of com.liferay.roster.model.impl.RosterMemberImpl in project liferay-ide by liferay.
the class RosterMemberPersistenceImpl method findByRosterId_PrevAndNext.
/**
* Returns the roster members before and after the current roster member in the ordered set where rosterId = ?.
*
* @param rosterMemberId the primary key of the current roster member
* @param rosterId the roster ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next roster member
* @throws NoSuchRosterMemberException if a roster member with the primary key could not be found
*/
@Override
public RosterMember[] findByRosterId_PrevAndNext(long rosterMemberId, long rosterId, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
RosterMember rosterMember = findByPrimaryKey(rosterMemberId);
Session session = null;
try {
session = openSession();
RosterMember[] array = new RosterMemberImpl[3];
array[0] = getByRosterId_PrevAndNext(session, rosterMember, rosterId, orderByComparator, true);
array[1] = rosterMember;
array[2] = getByRosterId_PrevAndNext(session, rosterMember, rosterId, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.roster.model.impl.RosterMemberImpl in project liferay-ide by liferay.
the class RosterMemberPersistenceImpl method findByUuid_PrevAndNext.
/**
* Returns the roster members before and after the current roster member in the ordered set where uuid = ?.
*
* @param rosterMemberId the primary key of the current roster member
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next roster member
* @throws NoSuchRosterMemberException if a roster member with the primary key could not be found
*/
@Override
public RosterMember[] findByUuid_PrevAndNext(long rosterMemberId, String uuid, OrderByComparator<RosterMember> orderByComparator) throws NoSuchRosterMemberException {
RosterMember rosterMember = findByPrimaryKey(rosterMemberId);
Session session = null;
try {
session = openSession();
RosterMember[] array = new RosterMemberImpl[3];
array[0] = getByUuid_PrevAndNext(session, rosterMember, uuid, orderByComparator, true);
array[1] = rosterMember;
array[2] = getByUuid_PrevAndNext(session, rosterMember, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.roster.model.impl.RosterMemberImpl in project liferay-ide by liferay.
the class RosterMemberPersistenceImpl method create.
/**
* Creates a new roster member with the primary key. Does not add the roster member to the database.
*
* @param rosterMemberId the primary key for the new roster member
* @return the new roster member
*/
@Override
public RosterMember create(long rosterMemberId) {
RosterMember rosterMember = new RosterMemberImpl();
rosterMember.setNew(true);
rosterMember.setPrimaryKey(rosterMemberId);
String uuid = PortalUUIDUtil.generate();
rosterMember.setUuid(uuid);
return rosterMember;
}
Aggregations