throws SystemException {
lfBigDecimal = toUnwrappedModel(lfBigDecimal);
boolean isNew = lfBigDecimal.isNew();
LFBigDecimalModelImpl lfBigDecimalModelImpl = (LFBigDecimalModelImpl) lfBigDecimal;
Session session = null;
try {
session = openSession();
if (lfBigDecimal.isNew()) {
session.save(lfBigDecimal);
lfBigDecimal.setNew(false);
} else {
session.merge(lfBigDecimal);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFBigDecimalModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfBigDecimalModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_DECIMAL.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfBigDecimalModelImpl.getOriginalDecimal()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_DECIMAL, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_DECIMAL,
args);
args = new Object[] { lfBigDecimalModelImpl.getDecimal() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_DECIMAL, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_DECIMAL,
args);
}