118
Приложение. Листинг основных программных модулей
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.ResourceBundle;
import java.util.stream.Collector;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
* Класс (модель) для таблицы "Документ"
*/
@Entity
@Table(name = "document")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Document.findAll", query = "SELECT d FROM
Document d")
, @NamedQuery(name = "Document.findById", query = "SELECT d FROM
Document d WHERE d.id = :id")
, @NamedQuery(name = "Document.findByCreatedBy", query = "SELECT d
FROM Document d WHERE d.createdBy = :createdBy")
, @NamedQuery(name = "Document.findByModifiedBy", query = "SELECT d
FROM Document d WHERE d.modifiedBy = :modifiedBy")