Search in sources :

Example 26 with Club

use of com.liferay.roster.model.Club 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;
}
Also used : Club(com.liferay.roster.model.Club) ClubImpl(com.liferay.roster.model.impl.ClubImpl)

Example 27 with Club

use of com.liferay.roster.model.Club in project liferay-ide by liferay.

the class ClubModelImpl method toModel.

/**
 * Converts the soap model instance into a normal model instance.
 *
 * @param soapModel the soap model instance to convert
 * @return the normal model instance
 */
public static Club toModel(ClubSoap soapModel) {
    if (soapModel == null) {
        return null;
    }
    Club model = new ClubImpl();
    model.setUuid(soapModel.getUuid());
    model.setClubId(soapModel.getClubId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());
    model.setName(soapModel.getName());
    return model;
}
Also used : Club(com.liferay.roster.model.Club)

Aggregations

Club (com.liferay.roster.model.Club)27 Test (org.junit.Test)13 NoSuchClubException (com.liferay.roster.exception.NoSuchClubException)8 Session (com.liferay.portal.kernel.dao.orm.Session)6 StringBundler (com.liferay.portal.kernel.util.StringBundler)6 ClubImpl (com.liferay.roster.model.impl.ClubImpl)5 ActionableDynamicQuery (com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery)4 Query (com.liferay.portal.kernel.dao.orm.Query)4 Serializable (java.io.Serializable)4 DynamicQuery (com.liferay.portal.kernel.dao.orm.DynamicQuery)3 HashSet (java.util.HashSet)3 FinderPath (com.liferay.portal.kernel.dao.orm.FinderPath)2 QueryPos (com.liferay.portal.kernel.dao.orm.QueryPos)2 IntegerWrapper (com.liferay.portal.kernel.util.IntegerWrapper)1 HashMap (java.util.HashMap)1 List (java.util.List)1