throws SystemException {
entry = toUnwrappedModel(entry);
boolean isNew = entry.isNew();
EntryModelImpl entryModelImpl = (EntryModelImpl)entry;
if (Validator.isNull(entry.getUuid())) {
String uuid = PortalUUIDUtil.generate();
entry.setUuid(uuid);
}
Session session = null;
try {
session = openSession();
if (entry.isNew()) {
session.save(entry);
entry.setNew(false);
}
else {
session.merge(entry);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !EntryModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((entryModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) {
Object[] args = new Object[] { entryModelImpl.getOriginalUuid() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID,
args);
args = new Object[] { entryModelImpl.getUuid() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID,
args);
}
if ((entryModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
entryModelImpl.getOriginalUuid(),
entryModelImpl.getOriginalCompanyId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C,
args);
args = new Object[] {
entryModelImpl.getUuid(), entryModelImpl.getCompanyId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C,
args);
}
if ((entryModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
entryModelImpl.getOriginalGroupId(),
entryModelImpl.getOriginalGuestbookId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_G, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G,
args);
args = new Object[] {
entryModelImpl.getGroupId(),
entryModelImpl.getGuestbookId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_G_G, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_G,
args);