throws SystemException {
lfRuleCondition = toUnwrappedModel(lfRuleCondition);
boolean isNew = lfRuleCondition.isNew();
LFRuleConditionModelImpl lfRuleConditionModelImpl = (LFRuleConditionModelImpl) lfRuleCondition;
Session session = null;
try {
session = openSession();
if (lfRuleCondition.isNew()) {
session.save(lfRuleCondition);
lfRuleCondition.setNew(false);
} else {
session.merge(lfRuleCondition);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFRuleConditionModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfRuleConditionModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ROLLUP.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfRuleConditionModelImpl.getOriginalRollupRuleID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ROLLUP, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ROLLUP,
args);
args = new Object[] { lfRuleConditionModelImpl.getRollupRuleID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ROLLUP, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ROLLUP,
args);
}
if ((lfRuleConditionModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONDITION.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfRuleConditionModelImpl.getOriginalConditionRuleID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CONDITION,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONDITION,
args);
args = new Object[] {
lfRuleConditionModelImpl.getConditionRuleID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CONDITION,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONDITION,