throws SystemException {
lfPackageScopeRule = toUnwrappedModel(lfPackageScopeRule);
boolean isNew = lfPackageScopeRule.isNew();
LFPackageScopeRuleModelImpl lfPackageScopeRuleModelImpl = (LFPackageScopeRuleModelImpl) lfPackageScopeRule;
Session session = null;
try {
session = openSession();
if (lfPackageScopeRule.isNew()) {
session.save(lfPackageScopeRule);
lfPackageScopeRule.setNew(false);
} else {
session.merge(lfPackageScopeRule);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFPackageScopeRuleModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfPackageScopeRuleModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfPackageScopeRuleModelImpl.getOriginalPackageID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID,
args);
args = new Object[] { lfPackageScopeRuleModelImpl.getPackageID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID,
args);
}
if ((lfPackageScopeRuleModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SCOPE.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfPackageScopeRuleModelImpl.getOriginalScope(),
lfPackageScopeRuleModelImpl.getOriginalScopeID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_SCOPE, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SCOPE,
args);
args = new Object[] {
lfPackageScopeRuleModelImpl.getScope(),
lfPackageScopeRuleModelImpl.getScopeID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_SCOPE, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SCOPE,
args);
}
if ((lfPackageScopeRuleModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALLBYPACKAGEIDANDSCOPE.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfPackageScopeRuleModelImpl.getOriginalPackageID(),
lfPackageScopeRuleModelImpl.getOriginalScope(),
lfPackageScopeRuleModelImpl.getOriginalScopeID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ALLBYPACKAGEIDANDSCOPE,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALLBYPACKAGEIDANDSCOPE,
args);
args = new Object[] {
lfPackageScopeRuleModelImpl.getPackageID(),
lfPackageScopeRuleModelImpl.getScope(),
lfPackageScopeRuleModelImpl.getScopeID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ALLBYPACKAGEIDANDSCOPE,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ALLBYPACKAGEIDANDSCOPE,
args);
}
if ((lfPackageScopeRuleModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_VISIBILITY.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfPackageScopeRuleModelImpl.getOriginalScope(),
lfPackageScopeRuleModelImpl.getOriginalScopeID(),
lfPackageScopeRuleModelImpl.getOriginalVisibility()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_VISIBILITY,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_VISIBILITY,
args);
args = new Object[] {
lfPackageScopeRuleModelImpl.getScope(),
lfPackageScopeRuleModelImpl.getScopeID(),
lfPackageScopeRuleModelImpl.getVisibility()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_VISIBILITY,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_VISIBILITY,