@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SApplicationMenuImpl)) return false; if (!super.equals(o)) return false; SApplicationMenuImpl that = (SApplicationMenuImpl) o; if (applicationId != that.applicationId) return false; if (index != that.index) return false; if (applicationPageId != null ? !applicationPageId.equals(that.applicationPageId) : that.applicationPageId != null) return false; if (displayName != null ? !displayName.equals(that.displayName) : that.displayName != null) return false; if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false; return true; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + (int) (applicationId ^ applicationId >>> 32); result = prime * result + (token == null ? 0 : token.hashCode()); result = prime * result + (int) (pageId ^ pageId >>> 32); return result; }
@Override public String toString() { return "SFormMappingImpl{" + "processDefinitionId=" + processDefinitionId + ", task='" + task + '\'' + ", pageMapping=" + pageMapping + ", type=" + type + ", lastUpdateDate=" + lastUpdateDate + ", lastUpdatedBy=" + lastUpdatedBy + "} " + super.toString(); } }
@Override public void delete(final PersistentObject entity) throws SPersistenceException { try { if (logger.isLoggable(getClass(), TechnicalLogSeverity.DEBUG)) { logger.log(this.getClass(), TechnicalLogSeverity.DEBUG, "[Tenant] Deleting instance of class " + entity.getClass().getSimpleName() + " with id=" + entity.getId()); } final Class<? extends PersistentObject> mappedClass = getMappedClass(entity.getClass()); final Session session = getSession(true); final Object pe = session.get(mappedClass, new PersistentObjectId(entity.getId(), getTenantId())); session.delete(pe); } catch (final AssertionFailure | LockAcquisitionException | StaleStateException e) { throw new SRetryableException(e); } catch (final STenantIdNotSetException | HibernateException e) { throw new SPersistenceException(e); } }
@Override public void delete(final PersistentObject entity) throws SPersistenceException { try { if (logger.isLoggable(getClass(), TechnicalLogSeverity.DEBUG)) { logger.log(this.getClass(), TechnicalLogSeverity.DEBUG, "[Tenant] Deleting instance of class " + entity.getClass().getSimpleName() + " with id=" + entity.getId()); } final Class<? extends PersistentObject> mappedClass = getMappedClass(entity.getClass()); final Session session = getSession(true); final Object pe = session.get(mappedClass, new PersistentObjectId(entity.getId(), getTenantId())); session.delete(pe); } catch (final AssertionFailure | LockAcquisitionException | StaleStateException e) { throw new SRetryableException(e); } catch (final STenantIdNotSetException | HibernateException e) { throw new SPersistenceException(e); } }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + (int) (applicationId ^ applicationId >>> 32); result = prime * result + (token == null ? 0 : token.hashCode()); result = prime * result + (int) (pageId ^ pageId >>> 32); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SApplicationMenuImpl)) return false; if (!super.equals(o)) return false; SApplicationMenuImpl that = (SApplicationMenuImpl) o; if (applicationId != that.applicationId) return false; if (index != that.index) return false; if (applicationPageId != null ? !applicationPageId.equals(that.applicationPageId) : that.applicationPageId != null) return false; if (displayName != null ? !displayName.equals(that.displayName) : that.displayName != null) return false; if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false; return true; }
@Override public String toString() { return "SFormMappingImpl{" + "processDefinitionId=" + processDefinitionId + ", task='" + task + '\'' + ", pageMapping=" + pageMapping + ", type=" + type + ", lastUpdateDate=" + lastUpdateDate + ", lastUpdatedBy=" + lastUpdatedBy + "} " + super.toString(); } }
@Override public void delete(final PersistentObject entity) throws SPersistenceException { if (logger.isLoggable(getClass(), TechnicalLogSeverity.DEBUG)) { logger.log(this.getClass(), TechnicalLogSeverity.DEBUG, "Deleting instance of class " + entity.getClass().getSimpleName() + " with id=" + entity.getId()); } final Class<? extends PersistentObject> mappedClass = getMappedClass(entity.getClass()); final Session session = getSession(true); try { if (session.contains(entity)) { session.delete(entity); } else { // Deletion must be performed on the session entity and not on a potential transitional entity. final Object pe = session.get(mappedClass, new PersistentObjectId(entity.getId(), 0)); session.delete(pe); } } catch (final AssertionFailure | LockAcquisitionException | StaleStateException e) { throw new SRetryableException(e); } catch (final HibernateException he) { throw new SPersistenceException(he); } }
@Override public int hashCode() { return Objects.hash(super.hashCode(), key, pageId, url, urlAdapter, lastUpdateDate, lastUpdatedBy, pageAuthorizRules); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SPageMappingImpl)) return false; if (!super.equals(o)) return false; SPageMappingImpl that = (SPageMappingImpl) o; return Objects.equals(lastUpdateDate, that.lastUpdateDate) && Objects.equals(lastUpdatedBy, that.lastUpdatedBy) && Objects.equals(key, that.key) && Objects.equals(pageId, that.pageId) && Objects.equals(url, that.url) && Objects.equals(urlAdapter, that.urlAdapter) && Objects.equals(pageAuthorizRules, that.pageAuthorizRules); }
@Override public String toString() { return "SPageMappingImpl{" + "key='" + key + '\'' + ", pageId=" + pageId + ", url='" + url + '\'' + ", urlAdapter='" + urlAdapter + '\'' + ", pageAuthorizRules='" + pageAuthorizRules + '\'' + ", authorizationRules=" + authorizationRules + ", lastUpdateDate=" + lastUpdateDate + ", lastUpdatedBy=" + lastUpdatedBy + "} " + super.toString(); } }
@Override public void delete(final PersistentObject entity) throws SPersistenceException { if (logger.isLoggable(getClass(), TechnicalLogSeverity.DEBUG)) { logger.log(this.getClass(), TechnicalLogSeverity.DEBUG, "Deleting instance of class " + entity.getClass().getSimpleName() + " with id=" + entity.getId()); } final Class<? extends PersistentObject> mappedClass = getMappedClass(entity.getClass()); final Session session = getSession(true); try { if (session.contains(entity)) { session.delete(entity); } else { // Deletion must be performed on the session entity and not on a potential transitional entity. final Object pe = session.get(mappedClass, new PersistentObjectId(entity.getId(), 0)); session.delete(pe); } } catch (final AssertionFailure | LockAcquisitionException | StaleStateException e) { throw new SRetryableException(e); } catch (final HibernateException he) { throw new SPersistenceException(he); } }
@Override public int hashCode() { return Objects.hash(super.hashCode(), processDefinitionId, task, pageMapping, type, lastUpdateDate, lastUpdatedBy); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SFormMappingImpl)) return false; if (!super.equals(o)) return false; SFormMappingImpl that = (SFormMappingImpl) o; return Objects.equals(processDefinitionId, that.processDefinitionId) && Objects.equals(lastUpdateDate, that.lastUpdateDate) && Objects.equals(lastUpdatedBy, that.lastUpdatedBy) && Objects.equals(task, that.task) && Objects.equals(pageMapping, that.pageMapping) && Objects.equals(type, that.type); }
@Override public String toString() { return "SPageMappingImpl{" + "key='" + key + '\'' + ", pageId=" + pageId + ", url='" + url + '\'' + ", urlAdapter='" + urlAdapter + '\'' + ", pageAuthorizRules='" + pageAuthorizRules + '\'' + ", authorizationRules=" + authorizationRules + ", lastUpdateDate=" + lastUpdateDate + ", lastUpdatedBy=" + lastUpdatedBy + "} " + super.toString(); } }
@SuppressWarnings("unchecked") @Override <T extends PersistentObject> T selectById(final Session session, final SelectByIdDescriptor<T> selectDescriptor) throws SBonitaReadException { try { final PersistentObjectId id = new PersistentObjectId(selectDescriptor.getId(), getTenantId()); Class<? extends PersistentObject> mappedClass = null; mappedClass = getMappedClass(selectDescriptor.getEntityType()); return (T) session.get(mappedClass, id); } catch (final STenantIdNotSetException e) { return super.selectById(session, selectDescriptor); } catch (final AssertionFailure | LockAcquisitionException | StaleStateException e) { throw new SRetryableException(e); } catch (final SPersistenceException | HibernateException e) { throw new SBonitaReadException(e); } }
@Override public int hashCode() { return Objects.hash(super.hashCode(), key, pageId, url, urlAdapter, lastUpdateDate, lastUpdatedBy, pageAuthorizRules); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SFormMappingImpl)) return false; if (!super.equals(o)) return false; SFormMappingImpl that = (SFormMappingImpl) o; return Objects.equals(processDefinitionId, that.processDefinitionId) && Objects.equals(lastUpdateDate, that.lastUpdateDate) && Objects.equals(lastUpdatedBy, that.lastUpdatedBy) && Objects.equals(task, that.task) && Objects.equals(pageMapping, that.pageMapping) && Objects.equals(type, that.type); }
@SuppressWarnings("unchecked") @Override <T extends PersistentObject> T selectById(final Session session, final SelectByIdDescriptor<T> selectDescriptor) throws SBonitaReadException { try { final PersistentObjectId id = new PersistentObjectId(selectDescriptor.getId(), getTenantId()); Class<? extends PersistentObject> mappedClass = null; mappedClass = getMappedClass(selectDescriptor.getEntityType()); return (T) session.get(mappedClass, id); } catch (final STenantIdNotSetException e) { return super.selectById(session, selectDescriptor); } catch (final AssertionFailure | LockAcquisitionException | StaleStateException e) { throw new SRetryableException(e); } catch (final SPersistenceException | HibernateException e) { throw new SBonitaReadException(e); } }