7 package cz.vutbr.fit.knot.annotations.modules.suggestionManager.attributes;
11 import javax.persistence.DiscriminatorValue;
12 import javax.persistence.Entity;
13 import javax.persistence.NamedQueries;
14 import javax.persistence.NamedQuery;
28 @DiscriminatorValue(
"Integer")
30 @NamedQuery(name =
"SuggestionAttribute.findByIntValue", query =
"SELECT a FROM SuggestionAttribute a WHERE a.intValue = :intValue"),
48 this.simpleType =
"Integer";
49 this.intValue = value;
50 this.refSuggestion = refSuggestion;
63 this.simpleType =
"Integer";
64 this.intValue = value;
65 this.refSuggestion = refSuggestion;
66 this.priority = priority;
86 this.intValue = (Integer) value;
97 public void setRawValue(String value)
throws IllegalArgumentException {
99 this.intValue = Integer.parseInt(value);
100 }
catch (NumberFormatException e) {
101 throw new IllegalArgumentException(
"Value " + value +
" is not a valid integer value");
void setValue(Object value)
String getTypeOntologyUri()
Class representing attribute of suggestion.
SugIntegerAttribute(String name, Integer value, Suggestion refSuggestion)
void setRawValue(String value)
Class representing suggestion of annotation.
SugIntegerAttribute(String name, Integer value, Suggestion refSuggestion, Integer priority)
static final String INTEGER_URI
Class representing attribute of type Integer for prupose of suggestion.