![JAR search and dependency download from the Maven repository](/logo.png)
org.neo4j.internal.schema.ReservedSchemaRuleNames Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neo4j-schema Show documentation
Show all versions of neo4j-schema Show documentation
Schema descriptors and interfaces in Neo4j.
/*
* Copyright (c) "Neo4j"
* Neo4j Sweden AB [https://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package org.neo4j.internal.schema;
import static java.util.stream.Collectors.toUnmodifiableSet;
import java.util.Set;
import java.util.stream.Stream;
/**
* This enum contains names that {@link SchemaRule#getName()} could perhaps return, but which are reserved for current or future internal use.
* That is, no user, admin or operator can create schema rules with these names.
*/
public enum ReservedSchemaRuleNames {
/**
* The name used for NO_INDEX equivalents in pre-4.0 versions.
*/
UNNAMED_INDEX("Unnamed index"),
/**
* Used by {@link IndexDescriptor#NO_INDEX}.
*/
NO_INDEX(""),
NO_CONSTRAINT(""), // Reserved for future.
NO_RULE(""), // Reserved for future.
NO_SCHEMA(""), // Reserved for future.
NO_TRIGGER(""), // Reserved for future.
NO_SEQUENCE(""), // Reserved for future.
NO_CATALOG(""), // Reserved for future.
NO_DATABASE(""), // Reserved for future.
NO_GRAPH(""), // Reserved for future.
NO_MAP(""), // Reserved for future.
NO_OBJECT(""); // Reserved for future.
private static final Set RESERVED_NAMES =
Stream.of(values()).map(ReservedSchemaRuleNames::getReservedName).collect(toUnmodifiableSet());
private final String reservedName;
ReservedSchemaRuleNames(String reservedName) {
this.reservedName = reservedName;
}
public static boolean contains(String name) {
return RESERVED_NAMES.contains(name);
}
public static Set getReservedNames() {
return RESERVED_NAMES;
}
public String getReservedName() {
return reservedName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy