public static class OakIndexUtils.PropertyIndex extends Object
| Constructor and Description |
|---|
OakIndexUtils.PropertyIndex() |
| Modifier and Type | Method and Description |
|---|---|
Node |
create(Session session)
Create the index.
|
Node |
create(Session session,
String indexType) |
OakIndexUtils.PropertyIndex |
name(String indexName)
Set the index name.
|
OakIndexUtils.PropertyIndex |
nodeTypes(String... nodeTypeNames)
Restrict the node types.
|
OakIndexUtils.PropertyIndex |
property(String propertyName)
Set the property name.
|
public OakIndexUtils.PropertyIndex name(String indexName)
indexName - the index namepublic OakIndexUtils.PropertyIndex property(String propertyName)
propertyName - the property namepublic OakIndexUtils.PropertyIndex nodeTypes(String... nodeTypeNames)
nodeTypeNames - the list of declaring node types@Nullable public Node create(Session session) throws RepositoryException
If this is not a Oak repository, this method does nothing.
If a matching index already exists, this method verifies that the definition matches. If no such index exists, a new one is created.
session - the session to use for creating the indexRepositoryException - if writing to the repository failed, the
index definition is incorrect, or if such an index exists
but is not compatible with this definition (for example,
a different property is indexed)@Nullable public Node create(Session session, String indexType) throws RepositoryException
RepositoryExceptionCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.