Skip to content

Commit c14ec56

Browse files
committed
Merge branch 'newRegressionTests' of https://github.com/marklogic/java-client-api into newRegressionTests
2 parents e218f20 + 62c79fc commit c14ec56

23 files changed

+2410
-31
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
package com.marklogic.javaclient;
2+
3+
import java.util.Calendar;
4+
5+
import com.marklogic.client.pojo.annotation.Id;
6+
import com.marklogic.client.pojo.annotation.PathIndexProperty;
7+
import com.marklogic.client.pojo.annotation.PathIndexProperty.ScalarType;
8+
9+
/*
10+
* This class is similar to the Artifact class. It is used to test path range index using the DateTime field
11+
* Property name been annotated with @Id.
12+
*/
13+
public class ArtifactIndexedOnDateTime {
14+
@Id
15+
public String name;
16+
public long id;
17+
private Company manufacturer;
18+
private int inventory;
19+
20+
@PathIndexProperty(scalarType = ScalarType.DATETIME)
21+
private Calendar expiryDate;
22+
23+
public long getId() {
24+
return id;
25+
}
26+
27+
public ArtifactIndexedOnDateTime setId(long id) {
28+
this.id = id;
29+
return this;
30+
}
31+
32+
public String getName() {
33+
return name;
34+
}
35+
36+
public ArtifactIndexedOnDateTime setName(String name) {
37+
this.name = name;
38+
return this;
39+
}
40+
41+
public Company getManufacturer() {
42+
return manufacturer;
43+
}
44+
45+
public ArtifactIndexedOnDateTime setManufacturer(Company manufacturer) {
46+
this.manufacturer = manufacturer;
47+
return this;
48+
}
49+
50+
public int getInventory() {
51+
return inventory;
52+
}
53+
54+
public ArtifactIndexedOnDateTime setInventory(int inventory) {
55+
this.inventory = inventory;
56+
return this;
57+
}
58+
59+
public Calendar getExpiryDate() {
60+
return expiryDate;
61+
}
62+
63+
public ArtifactIndexedOnDateTime setExpiryDate(Calendar expiryDate) {
64+
this.expiryDate = expiryDate;
65+
return this;
66+
}
67+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
/*
8+
* This class is similar to the Artifact class. It is used to test path range index using the inventory field
9+
* Property name been annotated with @Id.
10+
*/
11+
public class ArtifactIndexedOnInt {
12+
@Id
13+
public String name;
14+
public long id;
15+
private Company manufacturer;
16+
17+
@PathIndexProperty(scalarType = ScalarType.INT)
18+
private int inventory;
19+
20+
public long getId() {
21+
return id;
22+
}
23+
24+
public ArtifactIndexedOnInt setId(long id) {
25+
this.id = id;
26+
return this;
27+
}
28+
29+
public String getName() {
30+
return name;
31+
}
32+
33+
public ArtifactIndexedOnInt setName(String name) {
34+
this.name = name;
35+
return this;
36+
}
37+
38+
public Company getManufacturer() {
39+
return manufacturer;
40+
}
41+
42+
public ArtifactIndexedOnInt setManufacturer(Company manufacturer) {
43+
this.manufacturer = manufacturer;
44+
return this;
45+
}
46+
47+
public int getInventory() {
48+
return inventory;
49+
}
50+
51+
public ArtifactIndexedOnInt setInventory(int inventory) {
52+
this.inventory = inventory;
53+
return this;
54+
}
55+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
/*
8+
* This class is similar to the Artifact class. It is used to test path range index using the id field
9+
* indexed as string.
10+
* Property name been annotated with @Id.
11+
*/
12+
public class ArtifactIndexedOnIntAsString {
13+
@Id
14+
public String name;
15+
public long id;
16+
private Company manufacturer;
17+
18+
// Note int is annotated as a string
19+
@PathIndexProperty(scalarType = ScalarType.STRING)
20+
private int inventory;
21+
22+
public long getId() {
23+
return id;
24+
}
25+
26+
public ArtifactIndexedOnIntAsString setId(long id) {
27+
this.id = id;
28+
return this;
29+
}
30+
31+
public String getName() {
32+
return name;
33+
}
34+
35+
public ArtifactIndexedOnIntAsString setName(String name) {
36+
this.name = name;
37+
return this;
38+
}
39+
40+
public Company getManufacturer() {
41+
return manufacturer;
42+
}
43+
44+
public ArtifactIndexedOnIntAsString setManufacturer(Company manufacturer) {
45+
this.manufacturer = manufacturer;
46+
return this;
47+
}
48+
49+
public int getInventory() {
50+
return inventory;
51+
}
52+
53+
public ArtifactIndexedOnIntAsString setInventory(int inventory) {
54+
this.inventory = inventory;
55+
return this;
56+
}
57+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
/*
8+
* This class is similar to the Artifact class. It is used to test path range index on multiple class fields
9+
* Property name been annotated with @Id.
10+
*
11+
*/
12+
public class ArtifactIndexedOnMultipleFields {
13+
@Id
14+
@PathIndexProperty(scalarType = ScalarType.STRING)
15+
public String name;
16+
public long id;
17+
private Company manufacturer;
18+
19+
@PathIndexProperty(scalarType = ScalarType.INT)
20+
private int inventory;
21+
22+
public long getId() {
23+
return id;
24+
}
25+
26+
public ArtifactIndexedOnMultipleFields setId(long id) {
27+
this.id = id;
28+
return this;
29+
}
30+
31+
public String getName() {
32+
return name;
33+
}
34+
35+
public ArtifactIndexedOnMultipleFields setName(String name) {
36+
this.name = name;
37+
return this;
38+
}
39+
40+
public Company getManufacturer() {
41+
return manufacturer;
42+
}
43+
44+
public ArtifactIndexedOnMultipleFields setManufacturer(Company manufacturer) {
45+
this.manufacturer = manufacturer;
46+
return this;
47+
}
48+
49+
public int getInventory() {
50+
return inventory;
51+
}
52+
53+
public ArtifactIndexedOnMultipleFields setInventory(int inventory) {
54+
this.inventory = inventory;
55+
return this;
56+
}
57+
}
58+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
/*
8+
* This class is similar to the Artifact class. It is used to test path range index using the name field
9+
* which has been annotated with @Id also.
10+
*/
11+
public class ArtifactIndexedOnString {
12+
@Id
13+
@PathIndexProperty(scalarType = ScalarType.STRING)
14+
public String name;
15+
16+
public long id;
17+
private Company manufacturer;
18+
private int inventory;
19+
20+
public long getId() {
21+
return id;
22+
}
23+
24+
public ArtifactIndexedOnString setId(long id) {
25+
this.id = id;
26+
return this;
27+
}
28+
29+
public String getName() {
30+
return name;
31+
}
32+
33+
public ArtifactIndexedOnString setName(String name) {
34+
this.name = name;
35+
return this;
36+
}
37+
38+
public Company getManufacturer() {
39+
return manufacturer;
40+
}
41+
42+
public ArtifactIndexedOnString setManufacturer(Company manufacturer) {
43+
this.manufacturer = manufacturer;
44+
return this;
45+
}
46+
47+
public int getInventory() {
48+
return inventory;
49+
}
50+
51+
public ArtifactIndexedOnString setInventory(int inventory) {
52+
this.inventory = inventory;
53+
return this;
54+
}
55+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
package com.marklogic.javaclient;
2+
3+
import java.net.URI;
4+
5+
import com.marklogic.client.pojo.annotation.Id;
6+
import com.marklogic.client.pojo.annotation.PathIndexProperty;
7+
import com.marklogic.client.pojo.annotation.PathIndexProperty.ScalarType;
8+
9+
/*
10+
* This class is similar to the Artifact class. It is used to test path range index using the URI field
11+
* Property name annotated with @Id.
12+
*/
13+
public class ArtifactIndexedOnUri {
14+
@Id
15+
public String name;
16+
17+
public long id;
18+
private Company manufacturer;
19+
private int inventory;
20+
21+
@PathIndexProperty(scalarType = ScalarType.ANYURI)
22+
private URI artifactUri;
23+
24+
public URI getArtifactUri() {
25+
return artifactUri;
26+
}
27+
28+
public void setArtifactUri(URI artifactUri) {
29+
this.artifactUri = artifactUri;
30+
}
31+
32+
public long getId() {
33+
return id;
34+
}
35+
36+
public ArtifactIndexedOnUri setId(long id) {
37+
this.id = id;
38+
return this;
39+
}
40+
41+
public String getName() {
42+
return name;
43+
}
44+
45+
public ArtifactIndexedOnUri setName(String name) {
46+
this.name = name;
47+
return this;
48+
}
49+
50+
public Company getManufacturer() {
51+
return manufacturer;
52+
}
53+
54+
public ArtifactIndexedOnUri setManufacturer(Company manufacturer) {
55+
this.manufacturer = manufacturer;
56+
return this;
57+
}
58+
59+
public int getInventory() {
60+
return inventory;
61+
}
62+
63+
public ArtifactIndexedOnUri setInventory(int inventory) {
64+
this.inventory = inventory;
65+
return this;
66+
}
67+
}

0 commit comments

Comments
 (0)