1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
@Entity
@Table(name = "I18_LABEL")
@NamedQueries(
{
@NamedQuery(
name = "label.findByLocale",
query = "from Label label where upper(label.labelPK.locale)=upper(?)"
),
@NamedQuery(
name = "label.findAllCriteria",
query = " from Label label where upper(label.labelPK.locale)=upper(?) and upper(label.labelPK.key)=upper(?) and\n" +
" upper(label.value)=upper(?)"
),
@NamedQuery(
name = "label.findAllKeys",
query = "select label.labelPK.key from Label label"
)
,
@NamedQuery(
name = "label.findKeysByLocale",
query = " delete from Label label where upper(label.labelPK.locale)=upper(?)"
)
,
@NamedQuery(
name = "label.deleteByLocale",
query = "delete from Label label where upper(label.labelPK.locale)=upper(?)"
)
,
@NamedQuery(
name = "label.deleteByKey",
query = "delete from Label label where upper(label.labelPK.key) like upper(?)"
)
,
@NamedQuery(
name = "label.deleteAll",
query = "delete from Label label"
)
}
)
public class Label implements ILabel {
@Id
private LabelPK labelPK = new LabelPK();
@SuppressWarnings("unused")
@Column(name = "I18_KEY", nullable = false, updatable = false, insertable = false)
private String key;
@SuppressWarnings("unused")
@Column(name = "I18_LOCALE", nullable = false, updatable = false, insertable = false)
private String locale;
@Column(name = "I18_VALUE")
private String value;
public String getKey() {
return labelPK.getKey();
}
public void setKey(String _key) {
this.labelPK.setKey(_key);
this.key = _key;
}
public String getLocale() {
return this.labelPK.getLocale();
}
public void setLocale(String _locale) {
this.labelPK.setLocale(_locale);
this.locale = _locale;
}
public Label() {
super();
}
public Label(LabelPK _labelPK, String _value) {
this();
this.labelPK = _labelPK;
this.key = _labelPK.getKey();
this.locale = _labelPK.getLocale();
this.value = _value;
}
public void setPrimaryKey(LabelPK _labelPK) {
this.labelPK = _labelPK;
}
public LabelPK getPrimaryKey() {
return this.labelPK;
}
public LabelPK getLabelPK() {
return this.labelPK;
}
public void setLabelPK(LabelPK _labelPK) {
this.labelPK = _labelPK;
}
public String getValue() {
return value;
}
public void setValue(String _value) {
this.value = _value;
}
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Label label = (Label) o;
if (!this.getPrimaryKey().equals(label.getPrimaryKey())) {
return false;
}
if (!value.equals(label.value)) {
return false;
}
return true;
}
public int hashCode() {
int result;
result = this.getPrimaryKey().hashCode();
result = 31 * result + value.hashCode();
return result;
}
} |
Partager