-
Notifications
You must be signed in to change notification settings - Fork 199
/
AnEmbeddable.java
70 lines (55 loc) · 1.84 KB
/
AnEmbeddable.java
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
/*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.backendtck.queries;
import java.util.List;
import javax.persistence.ElementCollection;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import org.hibernate.search.annotations.Analyze;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.IndexedEmbedded;
import org.hibernate.search.annotations.Store;
@Embeddable
public class AnEmbeddable {
// Store.YES for filtering in query
// Analyze.NO for projection in query
@Field(store = Store.YES, analyze = Analyze.NO)
private String embeddedString;
@Embedded
@IndexedEmbedded
private AnotherEmbeddable anotherEmbeddable;
@ElementCollection
@IndexedEmbedded
private List<AnotherEmbeddable> anotherCollection;
public AnEmbeddable() {
}
public AnEmbeddable(String embeddedString) {
this.embeddedString = embeddedString;
}
public AnEmbeddable(String embeddedString, AnotherEmbeddable anotherEmbeddable) {
this.embeddedString = embeddedString;
this.anotherEmbeddable = anotherEmbeddable;
}
public String getEmbeddedString() {
return embeddedString;
}
public void setEmbeddedString(String embeddedString) {
this.embeddedString = embeddedString;
}
public AnotherEmbeddable getAnotherEmbeddable() {
return anotherEmbeddable;
}
public void setAnotherEmbeddable(AnotherEmbeddable anotherEmbeddable) {
this.anotherEmbeddable = anotherEmbeddable;
}
public List<AnotherEmbeddable> getAnotherCollection() {
return anotherCollection;
}
public void setAnotherCollection(List<AnotherEmbeddable> anotherCollection) {
this.anotherCollection = anotherCollection;
}
}