public class BaseConstraintCreator extends Object implements ConstraintCreator
| Constructor and Description |
|---|
BaseConstraintCreator(InternalSchemaActions actions,
Label label) |
| 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. |
public BaseConstraintCreator(InternalSchemaActions actions, Label label)
public ConstraintCreator on(String propertyKey)
ConstraintCreatoruniqueness.on in interface ConstraintCreatorpropertyKey - the property key this constraint is about.ConstraintCreator instance to be used for further interaction.public ConstraintCreator unique()
ConstraintCreatorgiven property, such that
there can be at most one node, having the given label, for any set value of that property key.unique in interface ConstraintCreatorConstraintCreator instance to be used for further interaction.public ConstraintDefinition create()
ConstraintCreatorcreate in interface ConstraintCreatorconstraint.Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.