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.Schema
Modifier and Type | Method and Description |
---|---|
ConstraintDefinition |
create()
Creates a constraint with the details specified by the other methods in this interface.
|
ConstraintCreator |
on(String propertyKey)
Specifies that this constraint will be for the given property key.
|
ConstraintCreator |
unique()
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. |
ConstraintCreator on(String propertyKey)
uniqueness
.propertyKey
- the property key this constraint is about.ConstraintCreator
instance to be used for further interaction.ConstraintCreator unique()
given property
, such that
there can be at most one node, having the given label, for any set value of that property key.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-2013 The Neo4j Graph Database Project. All Rights Reserved.