File tree Expand file tree Collapse file tree 3 files changed +85
-0
lines changed
test-complete/src/test/java/com/marklogic/javaclient Expand file tree Collapse file tree 3 files changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .marklogic .javaclient ;
2+
3+ import com .marklogic .client .pojo .annotation .PathIndexProperty ;
4+ import com .marklogic .client .pojo .annotation .PathIndexProperty .ScalarType ;
5+
6+ /* This class is used to test range path index creation, when the Annotation is
7+ * in the super class and sub class adds an additional annotation entry.
8+ *
9+ * Used to test annotation in a hierarchy.
10+ */
11+ public class ArtifactIndexedOnStringSub extends ArtifactIndexedOnString {
12+ @ PathIndexProperty (scalarType = ScalarType .DOUBLE )
13+ public double artifactWeight ;
14+
15+ public double getArtifactWeight () {
16+ return artifactWeight ;
17+ }
18+
19+ public ArtifactIndexedOnStringSub setArtifactWeight (double artifactWeight ) {
20+ this .artifactWeight = artifactWeight ; return this ;
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ package com .marklogic .javaclient ;
2+
3+ import com .marklogic .client .pojo .annotation .Id ;
4+ import com .marklogic .client .pojo .annotation .PathIndexProperty ;
5+ import com .marklogic .client .pojo .annotation .PathIndexProperty .ScalarType ;
6+
7+ public class ArtifactIndexedUnSupportedDataType {
8+ @ Id
9+ public long id ;
10+ private String name ;
11+
12+ //Note: Any Type other than supported ones in ScalarType class will have compile issues.
13+ @ PathIndexProperty (scalarType = ScalarType .STRING )
14+ public Company manufacturer ;
15+ private int inventory ;
16+
17+ public long getId () {
18+ return id ;
19+ }
20+ public ArtifactIndexedUnSupportedDataType setId (long id ) {
21+ this .id = id ; return this ;
22+ }
23+ public String getName () {
24+ return name ;
25+ }
26+ public ArtifactIndexedUnSupportedDataType setName (String name ) {
27+ this .name = name ; return this ;
28+ }
29+ public Company getManufacturer () {
30+ return manufacturer ;
31+ }
32+ public ArtifactIndexedUnSupportedDataType setManufacturer (Company manufacturer ) {
33+ this .manufacturer = manufacturer ; return this ;
34+ }
35+ public int getInventory () {
36+ return inventory ;
37+ }
38+ public ArtifactIndexedUnSupportedDataType setInventory (int inventory ) {
39+ this .inventory = inventory ; return this ;
40+ }
41+ }
Original file line number Diff line number Diff line change 1+ package com .marklogic .javaclient ;
2+
3+ import com .marklogic .client .pojo .annotation .PathIndexProperty ;
4+ import com .marklogic .client .pojo .annotation .PathIndexProperty .ScalarType ;
5+ /* This class is used to test range path index creation, when the Annotation is
6+ * in the super class and also in sub class on the same class property with same data type.
7+ *
8+ * Used to test annotation with collisions in a hierarchy.
9+ */
10+
11+ public class ArtifactMultipleIndexedOnInt extends ArtifactIndexedOnInt {
12+ @ PathIndexProperty (scalarType = ScalarType .INT )
13+ private int inventory ;
14+
15+ public int getInventory () {
16+ return inventory ;
17+ }
18+
19+ public ArtifactMultipleIndexedOnInt setInventory (int inventory ) {
20+ this .inventory = inventory ; return this ;
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments