|
| 1 | +/* |
| 2 | + * Copyright 2014-2016 MarkLogic Corporation |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.marklogic.client.functionaltest; |
| 18 | + |
| 19 | +import java.util.Calendar; |
| 20 | + |
| 21 | +import com.fasterxml.jackson.annotation.JsonTypeInfo; |
| 22 | +import com.marklogic.client.pojo.annotation.Id; |
| 23 | +import com.marklogic.client.pojo.annotation.PathIndexProperty; |
| 24 | +import com.marklogic.client.pojo.annotation.PathIndexProperty.ScalarType; |
| 25 | + |
| 26 | +/* |
| 27 | + * This class is similar to the Artifact class. It is used to test path range index using the Calendar field |
| 28 | + * Property name been annotated with @Id. |
| 29 | + */ |
| 30 | +public class ArtifactIndexedOnCalendar { |
| 31 | + @Id |
| 32 | + public String name; |
| 33 | + public long id; |
| 34 | + private Company manufacturer; |
| 35 | + private int inventory; |
| 36 | + |
| 37 | + @JsonTypeInfo(use=JsonTypeInfo.Id.NONE, include=JsonTypeInfo.As.EXTERNAL_PROPERTY) |
| 38 | + |
| 39 | + public Calendar expiryDate; |
| 40 | + |
| 41 | + public long getId() { |
| 42 | + return id; |
| 43 | + } |
| 44 | + |
| 45 | + public ArtifactIndexedOnCalendar setId(long id) { |
| 46 | + this.id = id; |
| 47 | + return this; |
| 48 | + } |
| 49 | + |
| 50 | + public String getName() { |
| 51 | + return name; |
| 52 | + } |
| 53 | + |
| 54 | + public ArtifactIndexedOnCalendar setName(String name) { |
| 55 | + this.name = name; |
| 56 | + return this; |
| 57 | + } |
| 58 | + |
| 59 | + public Company getManufacturer() { |
| 60 | + return manufacturer; |
| 61 | + } |
| 62 | + |
| 63 | + public ArtifactIndexedOnCalendar setManufacturer(Company manufacturer) { |
| 64 | + this.manufacturer = manufacturer; |
| 65 | + return this; |
| 66 | + } |
| 67 | + |
| 68 | + public int getInventory() { |
| 69 | + return inventory; |
| 70 | + } |
| 71 | + |
| 72 | + public ArtifactIndexedOnCalendar setInventory(int inventory) { |
| 73 | + this.inventory = inventory; |
| 74 | + return this; |
| 75 | + } |
| 76 | + |
| 77 | + public Calendar getExpiryDate() { |
| 78 | + return expiryDate; |
| 79 | + } |
| 80 | + |
| 81 | + public ArtifactIndexedOnCalendar setExpiryDate(Calendar expiryDate) { |
| 82 | + this.expiryDate = expiryDate; |
| 83 | + return this; |
| 84 | + } |
| 85 | +} |
0 commit comments