8 package cz.vutbr.fit.knot.annotations.entity.attribute;
12 import javax.persistence.DiscriminatorValue;
13 import javax.persistence.Entity;
14 import javax.persistence.NamedQueries;
15 import javax.persistence.NamedQuery;
29 @DiscriminatorValue(
"Integer")
31 @NamedQuery(name =
"Attribute.findByIntValue", query =
"SELECT a FROM Attribute a WHERE a.intValue = :intValue"),
50 this.simpleType =
"Integer";
51 this.intValue = value;
52 this.refAnnotation = refAnnotation;
73 this.intValue = (Integer) value;
84 public void setRawValue(String value)
throws IllegalArgumentException {
90 this.intValue = Integer.parseInt(value);
91 }
catch (NumberFormatException e) {
92 throw new IllegalArgumentException(
"Value " + value +
" is not a valid integer value");
void setRawValue(String value)
void setValue(Object value)
String getTypeOntologyUri()
IntegerAttribute(String name, Integer value, Annotation refAnnotation)
Class representing attribute of type Integer.
Base class representing attribute of annotation.
static final String INTEGER_URI
Class representing annotation.