public class SQLForeignKeyBuilder extends Object
SQLForeignKey
. Requires what ConstraintBuilder
requires, plus
primary key
database, table, column and name.Modifier and Type | Field and Description |
---|---|
protected String |
catName |
protected String |
constraintName |
protected String |
dbName |
protected boolean |
enable |
protected boolean |
rely |
protected String |
tableName |
protected boolean |
validate |
Constructor and Description |
---|
SQLForeignKeyBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
addColumn(String columnName) |
SQLForeignKeyBuilder |
addPkColumn(String pkColumn) |
List<SQLForeignKey> |
build(org.apache.hadoop.conf.Configuration conf) |
protected void |
checkBuildable(String defaultConstraintName,
org.apache.hadoop.conf.Configuration conf) |
SQLForeignKeyBuilder |
fromPrimaryKey(List<SQLPrimaryKey> pk) |
protected int |
getNextSeq() |
T |
onTable(Table table) |
T |
setCatName(String catName) |
protected void |
setChild(T child) |
T |
setConstraintName(String constraintName) |
T |
setDbName(String dbName) |
SQLForeignKeyBuilder |
setDeleteRule(int deleteRule) |
T |
setEnable(boolean enable) |
SQLForeignKeyBuilder |
setPkDb(String pkDb) |
SQLForeignKeyBuilder |
setPkName(String pkName) |
SQLForeignKeyBuilder |
setPkTable(String pkTable) |
T |
setRely(boolean rely) |
T |
setTableName(String tableName) |
SQLForeignKeyBuilder |
setUpdateRule(int updateRule) |
T |
setValidate(boolean validate) |
protected String catName
protected String dbName
protected String tableName
protected String constraintName
protected boolean enable
protected boolean validate
protected boolean rely
public SQLForeignKeyBuilder setPkDb(String pkDb)
public SQLForeignKeyBuilder setPkTable(String pkTable)
public SQLForeignKeyBuilder addPkColumn(String pkColumn)
public SQLForeignKeyBuilder setPkName(String pkName)
public SQLForeignKeyBuilder fromPrimaryKey(List<SQLPrimaryKey> pk)
public SQLForeignKeyBuilder setUpdateRule(int updateRule)
public SQLForeignKeyBuilder setDeleteRule(int deleteRule)
public List<SQLForeignKey> build(org.apache.hadoop.conf.Configuration conf) throws MetaException
MetaException
protected void setChild(T child)
protected void checkBuildable(String defaultConstraintName, org.apache.hadoop.conf.Configuration conf) throws MetaException
MetaException
protected int getNextSeq()
public T setCatName(String catName)
public T setDbName(String dbName)
public T setTableName(String tableName)
public T onTable(Table table)
public T addColumn(String columnName)
public T setConstraintName(String constraintName)
public T setEnable(boolean enable)
public T setValidate(boolean validate)
public T setRely(boolean rely)
Copyright © 2022 The Apache Software Foundation. All rights reserved.