public class ForeignKeyConstraint extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ForeignKeyConstraint.Builder |
static class |
ForeignKeyConstraint.Component |
| Modifier and Type | Method and Description |
|---|---|
static ForeignKeyConstraint.Builder |
builder(DatabaseRelationDefinition relation,
DatabaseRelationDefinition referencedRelation)
creates a FOREIGN KEY builder
|
com.google.common.collect.ImmutableList<ForeignKeyConstraint.Component> |
getComponents()
returns the components of the foreign key constraint
each component defines a map from an attribute of the relation
to an attribute of the referenced relation
|
String |
getName()
returns the name of the foreign key constraint
|
DatabaseRelationDefinition |
getReferencedRelation()
returns referenced database relation
|
DatabaseRelationDefinition |
getRelation()
returns the relation with the foreign key
|
static ForeignKeyConstraint |
of(String name,
Attribute attribute,
Attribute reference)
creates a single-attribute foreign key
|
String |
toString() |
public static ForeignKeyConstraint.Builder builder(DatabaseRelationDefinition relation, DatabaseRelationDefinition referencedRelation)
relation - referencedRelation - public static ForeignKeyConstraint of(String name, Attribute attribute, Attribute reference)
name - attribute - reference - public String getName()
public com.google.common.collect.ImmutableList<ForeignKeyConstraint.Component> getComponents()
public DatabaseRelationDefinition getReferencedRelation()
public DatabaseRelationDefinition getRelation()
Copyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.