throws SystemException {
lfTincanLrsAttachment = toUnwrappedModel(lfTincanLrsAttachment);
boolean isNew = lfTincanLrsAttachment.isNew();
LFTincanLrsAttachmentModelImpl lfTincanLrsAttachmentModelImpl = (LFTincanLrsAttachmentModelImpl) lfTincanLrsAttachment;
Session session = null;
try {
session = openSession();
if (lfTincanLrsAttachment.isNew()) {
session.save(lfTincanLrsAttachment);
lfTincanLrsAttachment.setNew(false);
} else {
session.merge(lfTincanLrsAttachment);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFTincanLrsAttachmentModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfTincanLrsAttachmentModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfTincanLrsAttachmentModelImpl.getOriginalParentID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PARENTID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID,
args);
args = new Object[] { lfTincanLrsAttachmentModelImpl.getParentID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PARENTID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PARENTID,
args);
}