@PublicEvolving public final class UniqueConstraint extends Object
ConstraintTypeConstraint.ConstraintType| Modifier and Type | Method and Description |
|---|---|
String |
asSummaryString()
Returns constraint's summary.
|
boolean |
equals(Object o) |
List<String> |
getColumns()
List of column names for which the primary key was defined.
|
String |
getName() |
Constraint.ConstraintType |
getType()
Tells what kind of constraint it is, e.g.
|
int |
hashCode() |
boolean |
isEnforced()
Constraints can either be enforced or non-enforced.
|
static UniqueConstraint |
primaryKey(String name,
List<String> columns)
Creates a non enforced
ConstraintType#PRIMARY_KEY constraint. |
String |
toString() |
public static UniqueConstraint primaryKey(String name, List<String> columns)
ConstraintType#PRIMARY_KEY constraint.public List<String> getColumns()
public Constraint.ConstraintType getType()
Constraintpublic final String asSummaryString()
CONSTRAINT [constraint-name] [constraint-type] ([constraint-definition]) E.g CONSTRAINT pk PRIMARY KEY (f0, f1)
public boolean equals(Object o)
public int hashCode()
public String getName()
getName in interface Constraintpublic boolean isEnforced()
ConstraintisEnforced in interface ConstraintCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.