public interface ConstraintCreator
create() must be called for the constraint to actually be created. A constraint creator knows
which label it is to be created for.
All methods except create() will return an ConstraintCreator which should be
used for further interaction.
Compatibility note: New methods may be added to this interface without notice,
backwards compatibility is only guaranteed for clients of this interface, not for
implementors.Schema| Modifier and Type | Method and Description |
|---|---|
ConstraintCreator |
assertPropertyIsUnique(String propertyKey)
Imposes a uniqueness constraint for the given property, such that
there can be at most one node, having the given label, for any set value of that property key.
|
ConstraintDefinition |
create()
Creates a constraint with the details specified by the other methods in this interface.
|
ConstraintCreator assertPropertyIsUnique(String propertyKey)
ConstraintCreator instance to be used for further interaction.ConstraintDefinition create() throws ConstraintViolationException
constraint.ConstraintViolationException - if creating this constraint would violate any
existing constraints.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.