93
* @return Результат сравнения
*/
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DocumentHistory)) {
return false;
}
DocumentHistory other = (DocumentHistory) object;
if ((this.id == null && other.id != null) || (this.id != null &&
!this.id.equals(other.id))) {
return false;
}
return true;
}
/**
* Метод вычисления названия объекта
* @return Название
*/
@Override
public String toString() {
return "entities.DocumentHistory[ id=" + id + " ]";
}
}
/**
* Класс (модель) для таблицы "Правило доступа документа"
*/
@Entity
@Table(name = "document_rule")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "DocumentRule.findAll", query = "SELECT d FROM
DocumentRule d")
, @NamedQuery(name = "DocumentRule.findById", query = "SELECT d FROM
DocumentRule d WHERE d.id = :id")
, @NamedQuery(name = "DocumentRule.findByDocumentId", query = "SELECT d
FROM DocumentRule d WHERE d.idDocument.id = :idDocument")
, @NamedQuery(name = "DocumentRule.findByAccessView", query = "SELECT d
FROM DocumentRule d WHERE d.accessView = :accessView")
, @NamedQuery(name = "DocumentRule.findByAccessInsert", query = "SELECT d
FROM DocumentRule d WHERE d.accessInsert = :accessInsert")
, @NamedQuery(name = "DocumentRule.findByAccessUpdate", query = "SELECT
d FROM DocumentRule d WHERE d.accessUpdate = :accessUpdate")