DocumentType other = (DocumentType) 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 title;
}
}
/**
* Класс (модель) для таблицы "Должность пользователя"
*/
@Entity
@Table(name = "user_function")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "UserFunction.findAll", query = "SELECT u
FROM UserFunction u")
, @NamedQuery(name = "UserFunction.findById", query = "SELECT u
FROM UserFunction u WHERE u.id = :id")
, @NamedQuery(name = "UserFunction.findByTitle", query = "SELECT u
FROM UserFunction u WHERE u.title = :title")})
public class UserFunction implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id")
private Integer id;
@Size(max = 255)
@Column(name = "title")
private String title;
@OneToMany(mappedBy = "idUserFunction")
private Collection<DocumentRule> documentRuleCollection;
@OneToMany(mappedBy = "idUserFunction")
private Collection<User> userCollection;