@Retention(value=RUNTIME) public @interface PathIndexProperty
Use this annotation to specify that a Path Index (required for range queries) is needed for this pojo property. A path index is used rather than an element range index because we can restrict matches to only properties that are direct children of this class type. We do this by including the class name in the path specification on the path index.
This annotation can be associated with a public field:
import com.marklogic.client.pojo.annotation.PathIndexProperty; public class MyClass { @PathIndexProperty public Long myLongValue; }
or with a public getter method:
public class MyClass { private Long myLongValue; @PathIndexProperty public Long getMyLongValue() { return myLongValue; } // … setter methods … }
or with a public setter method:
public class MyClass { private Long myLongValue;
// ... getter methods ...
<b> @PathIndexProperty</b>
public void setMyLongValue(Long myLongValue) {
this.myLongValue = myLongValue;
}
}
Run GenerateIndexConfig to generate a package that can be used by administrators to create the indexes in MarkLogic Server.| Modifier and Type | Required Element and Description |
|---|---|
PathIndexProperty.ScalarType |
scalarType |
public abstract PathIndexProperty.ScalarType scalarType
Copyright © 2013-2017 MarkLogic Corporation.