use of com.liferay.roster.model.Roster in project liferay-ide by liferay.
the class RosterPersistenceTest method testRemove.
@Test
public void testRemove() throws Exception {
Roster newRoster = addRoster();
_persistence.remove(newRoster);
Roster existingRoster = _persistence.fetchByPrimaryKey(newRoster.getPrimaryKey());
Assert.assertNull(existingRoster);
}
use of com.liferay.roster.model.Roster in project liferay-ide by liferay.
the class RosterModelImpl method equals.
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Roster)) {
return false;
}
Roster roster = (Roster) obj;
long primaryKey = roster.getPrimaryKey();
if (getPrimaryKey() == primaryKey) {
return true;
} else {
return false;
}
}
use of com.liferay.roster.model.Roster in project liferay-ide by liferay.
the class RosterLocalServiceImpl method addRoster.
public Roster addRoster(long clubId, String name, ServiceContext serviceContext) {
Roster roster = rosterLocalService.createRoster(counterLocalService.increment());
roster.setClubId(clubId);
roster.setName(name);
roster.setCreateDate(serviceContext.getCreateDate());
roster.setModifiedDate(serviceContext.getModifiedDate());
return rosterLocalService.addRoster(roster);
}
use of com.liferay.roster.model.Roster in project liferay-ide by liferay.
the class RosterLocalServiceImpl method updateRoster.
public Roster updateRoster(long rosterId, long clubId, String name, ServiceContext serviceContext) throws PortalException {
Roster roster = rosterLocalService.getRoster(rosterId);
roster.setClubId(clubId);
roster.setName(name);
roster.setCreateDate(serviceContext.getCreateDate());
roster.setModifiedDate(serviceContext.getModifiedDate());
return rosterLocalService.updateRoster(roster);
}
Aggregations