use of com.liferay.roster.model.impl.ClubImpl in project liferay-ide by liferay.
the class ClubPersistenceImpl method toUnwrappedModel.
protected Club toUnwrappedModel(Club club) {
if (club instanceof ClubImpl) {
return club;
}
ClubImpl clubImpl = new ClubImpl();
clubImpl.setNew(club.isNew());
clubImpl.setPrimaryKey(club.getPrimaryKey());
clubImpl.setUuid(club.getUuid());
clubImpl.setClubId(club.getClubId());
clubImpl.setCreateDate(club.getCreateDate());
clubImpl.setModifiedDate(club.getModifiedDate());
clubImpl.setName(club.getName());
return clubImpl;
}
use of com.liferay.roster.model.impl.ClubImpl in project liferay-ide by liferay.
the class ClubPersistenceImpl method findByUuid_PrevAndNext.
/**
* Returns the clubs before and after the current club in the ordered set where uuid = ?.
*
* @param clubId the primary key of the current club
* @param uuid the uuid
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous, current, and next club
* @throws NoSuchClubException if a club with the primary key could not be found
*/
@Override
public Club[] findByUuid_PrevAndNext(long clubId, String uuid, OrderByComparator<Club> orderByComparator) throws NoSuchClubException {
Club club = findByPrimaryKey(clubId);
Session session = null;
try {
session = openSession();
Club[] array = new ClubImpl[3];
array[0] = getByUuid_PrevAndNext(session, club, uuid, orderByComparator, true);
array[1] = club;
array[2] = getByUuid_PrevAndNext(session, club, uuid, orderByComparator, false);
return array;
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
}
use of com.liferay.roster.model.impl.ClubImpl in project liferay-ide by liferay.
the class ClubPersistenceImpl method create.
/**
* Creates a new club with the primary key. Does not add the club to the database.
*
* @param clubId the primary key for the new club
* @return the new club
*/
@Override
public Club create(long clubId) {
Club club = new ClubImpl();
club.setNew(true);
club.setPrimaryKey(clubId);
String uuid = PortalUUIDUtil.generate();
club.setUuid(uuid);
return club;
}
Aggregations