public final class IndexUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static NodeBuilder |
createIndexDefinition(@NotNull NodeBuilder index,
@NotNull String indexDefName,
boolean reindex,
boolean unique,
@NotNull Collection<String> propertyNames,
@Nullable Collection<String> declaringNodeTypeNames)
Create a new property index definition below the given
indexNode. |
static NodeBuilder |
createIndexDefinition(@NotNull NodeBuilder indexNode,
@NotNull String indexDefName,
boolean unique,
@NotNull Iterable<String> propertyNames,
@Nullable String[] declaringNodeTypeNames,
@NotNull String propertyIndexType,
Map<String,String> properties)
Create a new property index definition below the given
indexNode of the provided
propertyIndexType. |
static Tree |
createIndexDefinition(@NotNull Tree indexNode,
@NotNull String indexDefName,
boolean unique,
@NotNull Collection<String> propertyNames,
@Nullable Collection<String> declaringNodeTypeNames,
@NotNull String propertyIndexType,
@Nullable Map<String,String> properties)
Create a new property index definition below the given
indexNode of the provided
propertyIndexType. |
static Tree |
createIndexDefinition(@NotNull Tree indexNode,
@NotNull String indexDefName,
boolean unique,
@NotNull String[] propertyNames,
String... declaringNodeTypeNames)
Create a new property2 index definition below the given
indexNode. |
static void |
createReferenceIndex(@NotNull NodeBuilder index) |
static @Nullable String |
getAsyncLaneName(NodeState idxState,
String indexPath) |
static @Nullable String |
getAsyncLaneName(NodeState idxState,
String indexPath,
PropertyState async) |
static NodeBuilder |
getOrCreateOakIndex(NodeBuilder root) |
static boolean |
isIndexNodeType(NodeState state) |
static boolean |
isIndexNodeType(NodeState state,
String typeIn) |
public static NodeBuilder getOrCreateOakIndex(NodeBuilder root)
public static NodeBuilder createIndexDefinition(@NotNull @NotNull NodeBuilder index, @NotNull @NotNull String indexDefName, boolean reindex, boolean unique, @NotNull @NotNull Collection<String> propertyNames, @Nullable @Nullable Collection<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 String indexDefName, boolean unique, @NotNull @NotNull String[] propertyNames, @NotNull String... declaringNodeTypeNames) throws RepositoryException
indexNode.indexNode - indexDefName - unique - propertyNames - declaringNodeTypeNames - RepositoryExceptionpublic static Tree createIndexDefinition(@NotNull @NotNull Tree indexNode, @NotNull @NotNull String indexDefName, boolean unique, @NotNull @NotNull Collection<String> propertyNames, @Nullable @Nullable Collection<String> declaringNodeTypeNames, @NotNull @NotNull String propertyIndexType, @Nullable @Nullable Map<String,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.RepositoryExceptionpublic static void createReferenceIndex(@NotNull
@NotNull NodeBuilder index)
public static boolean isIndexNodeType(NodeState state)
public static NodeBuilder createIndexDefinition(@NotNull @NotNull NodeBuilder indexNode, @NotNull @NotNull String indexDefName, boolean unique, @NotNull @NotNull Iterable<String> propertyNames, @Nullable @Nullable String[] declaringNodeTypeNames, @NotNull @NotNull String propertyIndexType, Map<String,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 String getAsyncLaneName(NodeState idxState, String indexPath)
@Nullable public static @Nullable String getAsyncLaneName(NodeState idxState, String indexPath, PropertyState async)
Copyright © 2010 - 2020 Adobe. All Rights Reserved