public final class IndexUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static NodeBuilder |
createIndexDefinition(@NotNull NodeBuilder index,
@NotNull java.lang.String indexDefName,
boolean reindex,
boolean unique,
@NotNull java.util.Collection<java.lang.String> propertyNames,
@Nullable java.util.Collection<java.lang.String> declaringNodeTypeNames)
Create a new property index definition below the given
indexNode . |
static NodeBuilder |
createIndexDefinition(@NotNull NodeBuilder indexNode,
@NotNull java.lang.String indexDefName,
boolean unique,
@NotNull java.lang.Iterable<java.lang.String> propertyNames,
@Nullable java.lang.String[] declaringNodeTypeNames,
@NotNull java.lang.String propertyIndexType,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a new property index definition below the given
indexNode of the provided
propertyIndexType . |
static Tree |
createIndexDefinition(@NotNull Tree indexNode,
@NotNull java.lang.String indexDefName,
boolean unique,
@NotNull java.util.Collection<java.lang.String> propertyNames,
@Nullable java.util.Collection<java.lang.String> declaringNodeTypeNames,
@NotNull java.lang.String propertyIndexType,
@Nullable java.util.Map<java.lang.String,java.lang.String> properties)
Create a new property index definition below the given
indexNode of the provided
propertyIndexType . |
static Tree |
createIndexDefinition(@NotNull Tree indexNode,
@NotNull java.lang.String indexDefName,
boolean unique,
@NotNull java.lang.String[] propertyNames,
java.lang.String... declaringNodeTypeNames)
Create a new property2 index definition below the given
indexNode . |
static void |
createReferenceIndex(@NotNull NodeBuilder index) |
static @Nullable java.lang.String |
getAsyncLaneName(NodeState idxState,
java.lang.String indexPath) |
static @Nullable java.lang.String |
getAsyncLaneName(NodeState idxState,
java.lang.String indexPath,
PropertyState async) |
static NodeBuilder |
getOrCreateOakIndex(NodeBuilder root) |
static boolean |
isIndexNodeType(NodeState state) |
static boolean |
isIndexNodeType(NodeState state,
java.lang.String typeIn) |
public static NodeBuilder getOrCreateOakIndex(NodeBuilder root)
public static NodeBuilder createIndexDefinition(@NotNull @NotNull NodeBuilder index, @NotNull @NotNull java.lang.String indexDefName, boolean reindex, boolean unique, @NotNull @NotNull java.util.Collection<java.lang.String> propertyNames, @Nullable @Nullable java.util.Collection<java.lang.String> declaringNodeTypeNames)
indexNode
.index
- The oak:index node builderindexDefName
- The name of the new property index.reindex
- true
if the the reindex flag should be turned on.unique
- true
if the index is expected the assert property
uniqueness.propertyNames
- The property names that should be indexed.declaringNodeTypeNames
- The declaring node type names or null
.public static Tree createIndexDefinition(@NotNull @NotNull Tree indexNode, @NotNull @NotNull java.lang.String indexDefName, boolean unique, @NotNull @NotNull java.lang.String[] propertyNames, @NotNull java.lang.String... declaringNodeTypeNames) throws RepositoryException
indexNode
.indexNode
- indexDefName
- unique
- propertyNames
- declaringNodeTypeNames
- RepositoryException
public static Tree createIndexDefinition(@NotNull @NotNull Tree indexNode, @NotNull @NotNull java.lang.String indexDefName, boolean unique, @NotNull @NotNull java.util.Collection<java.lang.String> propertyNames, @Nullable @Nullable java.util.Collection<java.lang.String> declaringNodeTypeNames, @NotNull @NotNull java.lang.String propertyIndexType, @Nullable @Nullable java.util.Map<java.lang.String,java.lang.String> properties) throws RepositoryException
indexNode
of the provided
propertyIndexType
.indexNode
- indexDefName
- unique
- propertyNames
- declaringNodeTypeNames
- propertyIndexType
- properties
- any additional property to be added to the index definition.RepositoryException
public static void createReferenceIndex(@NotNull @NotNull NodeBuilder index)
public static boolean isIndexNodeType(NodeState state)
public static boolean isIndexNodeType(NodeState state, java.lang.String typeIn)
public static NodeBuilder createIndexDefinition(@NotNull @NotNull NodeBuilder indexNode, @NotNull @NotNull java.lang.String indexDefName, boolean unique, @NotNull @NotNull java.lang.Iterable<java.lang.String> propertyNames, @Nullable @Nullable java.lang.String[] declaringNodeTypeNames, @NotNull @NotNull java.lang.String propertyIndexType, java.util.Map<java.lang.String,java.lang.String> properties) throws RepositoryException
indexNode
of the provided
propertyIndexType
.indexNode
- the oak:indexindexDefName
- the node for the index definitionunique
- true if uniquenesspropertyNames
- the list of properties to be indexeddeclaringNodeTypeNames
- propertyIndexType
- the type of the PropertyIndexproperties
- any additional property to be added to the index definition.RepositoryException
@Nullable public static @Nullable java.lang.String getAsyncLaneName(NodeState idxState, java.lang.String indexPath)
@Nullable public static @Nullable java.lang.String getAsyncLaneName(NodeState idxState, java.lang.String indexPath, PropertyState async)
Copyright © 2010 - 2020 Adobe. All Rights Reserved