org.sql.generation.api.grammar.builders.definition
Interface ForeignKeyConstraintBuilder

All Superinterfaces:
AbstractBuilder<ForeignKeyConstraint>

public interface ForeignKeyConstraintBuilder
extends AbstractBuilder<ForeignKeyConstraint>

The builder for table constraint FOREIGN KEY(source columns) REFERENCES table_name(target columns) etc....).

Author:
Stanislav Muhametsin

Method Summary
 ForeignKeyConstraintBuilder addSourceColumns(String... columnNames)
          Adds source column names to this foreign key constraint.
 ForeignKeyConstraintBuilder addTargetColumns(String... columnNames)
          Adds target column names to this foreign key constraint.
 MatchType getMatchType()
          Returns the match type for this foreign key constraint.
 ReferentialAction getOnDelete()
          Returns the ON DELETE action for this foreign key constraint.
 ReferentialAction getOnUpdate()
          Returns the ON UPDATE action for this foreign key constraint.
 List<String> getSourceColumns()
          Returns the source column names for this foreign key constraint.
 TableName getTableName()
          Returns the target table name for this foreign key constraint.
 List<String> getTargetColumns()
          Returns the target column names for this foreign key constraint.
 ForeignKeyConstraintBuilder setMatchType(MatchType matchType)
          Sets the match type for this foreign key constraint.
 ForeignKeyConstraintBuilder setOnDelete(ReferentialAction action)
          Sets the ON DELETE action.
 ForeignKeyConstraintBuilder setOnUpdate(ReferentialAction action)
          Sets the ON UPDATE action.
 ForeignKeyConstraintBuilder setTargetTableName(TableName tableName)
          Sets the target table name for this foreign key constraint.
 
Methods inherited from interface org.sql.generation.api.grammar.builders.AbstractBuilder
createExpression
 

Method Detail

addSourceColumns

ForeignKeyConstraintBuilder addSourceColumns(String... columnNames)
Adds source column names to this foreign key constraint.

Parameters:
columnNames - The source column names to be added to this foreign key constraint.
Returns:
This builder.

addTargetColumns

ForeignKeyConstraintBuilder addTargetColumns(String... columnNames)
Adds target column names to this foreign key constraint.

Parameters:
columnNames - The target column names to be added to this foreign key constraint.
Returns:
This builder.

setTargetTableName

ForeignKeyConstraintBuilder setTargetTableName(TableName tableName)
Sets the target table name for this foreign key constraint.

Parameters:
tableName - The target table name for this foreign key constraint.
Returns:
This builder.

setMatchType

ForeignKeyConstraintBuilder setMatchType(MatchType matchType)
Sets the match type for this foreign key constraint.

Parameters:
matchType - The match type for this foreign key constraint.
Returns:
This builder.
See Also:
MatchType

setOnUpdate

ForeignKeyConstraintBuilder setOnUpdate(ReferentialAction action)
Sets the ON UPDATE action.

Parameters:
action - The action to perform ON UPDATE.
Returns:
This builder.
See Also:
ReferentialAction

setOnDelete

ForeignKeyConstraintBuilder setOnDelete(ReferentialAction action)
Sets the ON DELETE action.

Parameters:
action - The action to perform ON DELETE.
Returns:
This builder.
See Also:
ReferentialAction

getSourceColumns

List<String> getSourceColumns()
Returns the source column names for this foreign key constraint.

Returns:
The source column names for this foreign key constraint.

getTargetColumns

List<String> getTargetColumns()
Returns the target column names for this foreign key constraint.

Returns:
The target column names for this foreign key constraint.

getTableName

TableName getTableName()
Returns the target table name for this foreign key constraint.

Returns:
The target table name for this foreign key constraint.

getMatchType

MatchType getMatchType()
Returns the match type for this foreign key constraint.

Returns:
The match type for this foreign key constraint.
See Also:
MatchType

getOnUpdate

ReferentialAction getOnUpdate()
Returns the ON UPDATE action for this foreign key constraint.

Returns:
The ON UPDATE action for this foreign key constraint.
See Also:
ReferentialAction

getOnDelete

ReferentialAction getOnDelete()
Returns the ON DELETE action for this foreign key constraint.

Returns:
The ON DELETE action for this foreign key constraint.
See Also:
ReferentialAction


Copyright © 2010-2011. All Rights Reserved.