14 package cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative;
 
   16 import java.io.Serializable;
 
   17 import javax.persistence.Basic;
 
   18 import javax.persistence.Column;
 
   19 import javax.persistence.Entity;
 
   20 import javax.persistence.GeneratedValue;
 
   21 import javax.persistence.GenerationType;
 
   22 import javax.persistence.Id;
 
   23 import javax.persistence.JoinColumn;
 
   24 import javax.persistence.ManyToOne;
 
   25 import javax.persistence.NamedQueries;
 
   26 import javax.persistence.NamedQuery;
 
   27 import javax.persistence.Table;
 
   28 import javax.validation.constraints.NotNull;
 
   29 import javax.validation.constraints.Size;
 
   30 import javax.xml.bind.annotation.XmlRootElement;
 
   39 @Table(name = 
"altEntityAdditionalAttribute")
 
   42   @NamedQuery(name = 
"AltEntityAdditionalAttribute.findAll", query = 
"SELECT s FROM AltEntityAdditionalAttribute s"),
 
   43   @NamedQuery(name = 
"AltEntityAdditionalAttribute.findById", query = 
"SELECT s FROM AltEntityAdditionalAttribute s WHERE s.id = :id"),
 
   44   @NamedQuery(name = 
"AltEntityAdditionalAttribute.findByName", query = 
"SELECT s FROM AltEntityAdditionalAttribute s WHERE s.name = :name"),
 
   45   @NamedQuery(name = 
"AltEntityAdditionalAttribute.findByStringValue", query = 
"SELECT s FROM AltEntityAdditionalAttribute s WHERE s.stringValue = :stringValue"),
 
   46   @NamedQuery(name = 
"AltEntityAdditionalAttribute.findByAlternativeAttId", query = 
"SELECT s FROM AltEntityAdditionalAttribute s WHERE s.alternativeAttId = :alternativeAttId")})
 
   48     private static final long serialVersionUID = 1L;
 
   52   @GeneratedValue(strategy = GenerationType.IDENTITY)
 
   53   @Basic(optional = 
false)
 
   58   @Basic(optional = false)
 
   60   @Size(min = 1, max = 255)
 
   61   @Column(name = "name")
 
   65   @Basic(optional = false)
 
   67   @Column(name = "type")
 
   71   @Basic(optional = true)
 
   72   @Size(min = 0, max = 255)
 
   73   @Column(name = "stringValue")
 
   74   private String stringValue;
 
   77   @Column(name = "priority")
 
   78   protected Integer priority;
 
   81   @Basic(optional = false)
 
   82   @Column(name = "alternativeAttId", nullable = false, insertable = false, updatable = false)
 
   83   private 
int alternativeAttId;
 
   86   @ManyToOne(optional = false)
 
   87   @JoinColumn(name = "alternativeAttId", referencedColumnName = "
id")
 
  105     this.stringValue = stringValue;
 
  106     this.alternativeAttribute = refAlternativeAttribute;
 
  120     this.stringValue = stringValue;
 
  121     this.alternativeAttribute = refAlternativeAttribute;
 
  193     this.stringValue = stringValue;
 
  202     return alternativeAttId;
 
  211     this.alternativeAttId = alternativeAttId;
 
  220     return alternativeAttribute;
 
  229     this.alternativeAttribute = refAlternativeAttribute;
 
  247     this.priority = priority;
 
  263       throw new UnsupportedOperationException(
"Not supported yet.");
 
  265     AltEntityAdditionalAttribute other = (AltEntityAdditionalAttribute) o;
 
  267     if (this.priority == null && other.
getPriority() == null) {
 
  271     if (this.priority == null && other.
getPriority() != null) {
 
  275     if (this.priority != null && other.
getPriority() == null) {
 
  279     return this.priority.compareTo(other.getPriority());
 
  284     return "cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AltEntityAdditionalAttribute[ id=" + 
id + 
" ]";
 
Class representing attribute of alternative of suggestion. 
void setAlternativeAttId(int alternativeAttId)
AltEntityAdditionalAttribute(String name, String type, String stringValue, AlternativeAttribute refAlternativeAttribute)
int getAlternativeAttId()
void setPriority(Integer priority)
void setName(String name)
void setRefAlternativeAttribute(AlternativeAttribute refAlternativeAttribute)
Class representing additional attribute of entity in alternative attribute. 
void setType(String type)
void setStringValue(String stringValue)
AltEntityAdditionalAttribute(String name, String stringValue, AlternativeAttribute refAlternativeAttribute)
AlternativeAttribute getRefAlternativeAttribute()