throws SystemException {
lfActivity = toUnwrappedModel(lfActivity);
boolean isNew = lfActivity.isNew();
LFActivityModelImpl lfActivityModelImpl = (LFActivityModelImpl) lfActivity;
Session session = null;
try {
session = openSession();
if (lfActivity.isNew()) {
session.save(lfActivity);
lfActivity.setNew(false);
} else {
session.merge(lfActivity);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFActivityModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfActivityModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfActivityModelImpl.getOriginalPackageID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID,
args);
args = new Object[] { lfActivityModelImpl.getPackageID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID,
args);
}
if ((lfActivityModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEIDANDORGANIZATIONID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfActivityModelImpl.getOriginalPackageID(),
lfActivityModelImpl.getOriginalOrganizationID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEIDANDORGANIZATIONID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEIDANDORGANIZATIONID,
args);
args = new Object[] {
lfActivityModelImpl.getPackageID(),
lfActivityModelImpl.getOrganizationID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEIDANDORGANIZATIONID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEIDANDORGANIZATIONID,
args);
}
if ((lfActivityModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEIDANDPARENTID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfActivityModelImpl.getOriginalPackageID(),
lfActivityModelImpl.getOriginalParentID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEIDANDPARENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEIDANDPARENTID,
args);
args = new Object[] {
lfActivityModelImpl.getPackageID(),
lfActivityModelImpl.getParentID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEIDANDPARENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEIDANDPARENTID,