@Test public void testResetOriginalValues() throws Exception { if (!PropsValues.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { return; } DLFolder newDLFolder = addDLFolder(); _persistence.clearCache(); DLFolderModelImpl existingDLFolderModelImpl = (DLFolderModelImpl) _persistence.findByPrimaryKey(newDLFolder.getPrimaryKey()); Assert.assertTrue( Validator.equals( existingDLFolderModelImpl.getUuid(), existingDLFolderModelImpl.getOriginalUuid())); Assert.assertEquals( existingDLFolderModelImpl.getGroupId(), existingDLFolderModelImpl.getOriginalGroupId()); Assert.assertEquals( existingDLFolderModelImpl.getRepositoryId(), existingDLFolderModelImpl.getOriginalRepositoryId()); Assert.assertEquals( existingDLFolderModelImpl.getGroupId(), existingDLFolderModelImpl.getOriginalGroupId()); Assert.assertEquals( existingDLFolderModelImpl.getParentFolderId(), existingDLFolderModelImpl.getOriginalParentFolderId()); Assert.assertTrue( Validator.equals( existingDLFolderModelImpl.getName(), existingDLFolderModelImpl.getOriginalName())); }
@Override public void resetOriginalValues() { DLFolderModelImpl dlFolderModelImpl = this; dlFolderModelImpl._originalUuid = dlFolderModelImpl._uuid; dlFolderModelImpl._originalFolderId = dlFolderModelImpl._folderId; dlFolderModelImpl._setOriginalFolderId = false; dlFolderModelImpl._originalGroupId = dlFolderModelImpl._groupId; dlFolderModelImpl._setOriginalGroupId = false; dlFolderModelImpl._originalCompanyId = dlFolderModelImpl._companyId; dlFolderModelImpl._setOriginalCompanyId = false; dlFolderModelImpl._setModifiedDate = false; dlFolderModelImpl._originalRepositoryId = dlFolderModelImpl._repositoryId; dlFolderModelImpl._setOriginalRepositoryId = false; dlFolderModelImpl._originalMountPoint = dlFolderModelImpl._mountPoint; dlFolderModelImpl._setOriginalMountPoint = false; dlFolderModelImpl._originalParentFolderId = dlFolderModelImpl._parentFolderId; dlFolderModelImpl._setOriginalParentFolderId = false; dlFolderModelImpl._originalName = dlFolderModelImpl._name; dlFolderModelImpl._originalHidden = dlFolderModelImpl._hidden; dlFolderModelImpl._setOriginalHidden = false; dlFolderModelImpl._originalStatus = dlFolderModelImpl._status; dlFolderModelImpl._setOriginalStatus = false; dlFolderModelImpl._columnBitmask = 0; }