com.github.drinkjava2.jdialects.model
Class FKeyConstraint

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

public class FKeyConstraint
extends Object

The platform-independent Foreign Key Constraint model

 Usage:
 Table t=new Table('Customer');
    ...
  t.fkey("column1").reference("refTable", "refColumn1")
  
  or compound foreign key: *  
  t.fkey("column1","column2").reference("refTable", "refColumn1", "refColumn2");
 
 

Since:
1.0.2
Author:
Yong Zhu

Constructor Summary
FKeyConstraint()
           
FKeyConstraint(InlineFKeyConstraint inline)
           
 
Method Summary
 List<String> getColumnNames()
           
 String[] getRefColumnNames()
           
 String getRefTableName()
           
 String getTableName()
           
 FKeyConstraint ref(String refTableName, String... refColumnNames)
           
 void setColumnNames(List<String> columnNames)
           
 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

FKeyConstraint

public FKeyConstraint()

FKeyConstraint

public FKeyConstraint(InlineFKeyConstraint inline)
Method Detail

ref

public FKeyConstraint ref(String refTableName,
                          String... refColumnNames)

getTableName

public String getTableName()

setTableName

public void setTableName(String tableName)

getColumnNames

public List<String> getColumnNames()

setColumnNames

public void setColumnNames(List<String> columnNames)

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.