}
protected com.liferay.portal.model.UserTrackerPath update(
com.liferay.portal.model.UserTrackerPath userTrackerPath)
throws SystemException {
Session session = null;
try {
if (userTrackerPath.isNew() || userTrackerPath.isModified()) {
session = openSession();
if (userTrackerPath.isNew()) {
UserTrackerPathHBM userTrackerPathHBM = new UserTrackerPathHBM(userTrackerPath.getUserTrackerPathId(),
userTrackerPath.getUserTrackerId(),
userTrackerPath.getPath(),
userTrackerPath.getPathDate());
session.save(userTrackerPathHBM);
session.flush();
}
else {
try {
UserTrackerPathHBM userTrackerPathHBM = (UserTrackerPathHBM)session.load(UserTrackerPathHBM.class,
userTrackerPath.getPrimaryKey());
userTrackerPathHBM.setUserTrackerId(userTrackerPath.getUserTrackerId());
userTrackerPathHBM.setPath(userTrackerPath.getPath());
userTrackerPathHBM.setPathDate(userTrackerPath.getPathDate());
session.flush();
}
catch (ObjectNotFoundException onfe) {
UserTrackerPathHBM userTrackerPathHBM = new UserTrackerPathHBM(userTrackerPath.getUserTrackerPathId(),
userTrackerPath.getUserTrackerId(),
userTrackerPath.getPath(),
userTrackerPath.getPathDate());
session.save(userTrackerPathHBM);
session.flush();
}
}
userTrackerPath.setNew(false);
userTrackerPath.setModified(false);