public class BaseConstraintCreator extends Object implements ConstraintCreator
Modifier and Type | Field and Description |
---|---|
protected InternalSchemaActions |
actions |
protected Label |
label |
Constructor and Description |
---|
BaseConstraintCreator(InternalSchemaActions actions,
Label label) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertInTransaction() |
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. |
protected final InternalSchemaActions actions
protected final Label label
public BaseConstraintCreator(InternalSchemaActions actions, Label label)
public ConstraintCreator on(String propertyKey)
ConstraintCreator
uniqueness
.on
in interface ConstraintCreator
propertyKey
- the property key this constraint is about.ConstraintCreator
instance to be used for further interaction.public ConstraintCreator unique()
ConstraintCreator
given 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 ConstraintCreator
ConstraintCreator
instance to be used for further interaction.public ConstraintDefinition create()
ConstraintCreator
create
in interface ConstraintCreator
constraint
.protected final void assertInTransaction()
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.