com.github.drinkjava2.jdialects.model
Class InlineFKeyConstraint

java.lang.Object
  extended by com.github.drinkjava2.jdialects.model.InlineFKeyConstraint

public class InlineFKeyConstraint
extends Object

An "in-line" style Foreign key constraint, some time it's more convenient than normal "FKeyConstraint"

 Usage:
 For simple Foreign Key:
     column("column1").fkey("refTable","refColumn1");
 
 For Compound Foreign Key:
     column("column1").fkey("refTable","refColumn1", "refColumn2"...);
     column("column2").fkey("refTable","refColumn1", "refColumn2"...);
     
 Note: the order is important
 
 

Since:
1.0.2
Author:
Yong Zhu

Constructor Summary
InlineFKeyConstraint()
           
InlineFKeyConstraint(String tableName, String columnName, String refTableName, String... refColumnNames)
           
 
Method Summary
 String getColumnName()
           
 String getFkeyReferenceTable()
           
 String[] getRefColumnNames()
           
 String getRefTableName()
           
 String getTableName()
           
 void setColumnName(String columnName)
           
 void setRefColumnNames(String[] refColumnNames)
           
 void setRefTableName(String refTableName)
           
 void setTableName(String tableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineFKeyConstraint

public InlineFKeyConstraint()

InlineFKeyConstraint

public InlineFKeyConstraint(String tableName,
                            String columnName,
                            String refTableName,
                            String... refColumnNames)
Method Detail

getFkeyReferenceTable

public String getFkeyReferenceTable()

getTableName

public String getTableName()

setTableName

public void setTableName(String tableName)

getColumnName

public String getColumnName()

setColumnName

public void setColumnName(String columnName)

getRefTableName

public String getRefTableName()

setRefTableName

public void setRefTableName(String refTableName)

getRefColumnNames

public String[] getRefColumnNames()

setRefColumnNames

public void setRefColumnNames(String[] refColumnNames)


Copyright © 2017. All rights reserved.