org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.tableeditor.utils
Class TableModelUtil

java.lang.Object
  extended by org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.tableeditor.utils.TableModelUtil

public class TableModelUtil
extends java.lang.Object

Table related utilities

Author:
Idull

Constructor Summary
TableModelUtil()
           
 
Method Summary
static java.lang.String constructConstraintNamesList(java.util.List matches)
           
static java.util.List getMatchedColumnCheckConstraint(BaseTable table, Column column)
           
static java.util.List getMatchedColumnForeignKeys(BaseTable table, Column column)
          Returns all the foreign keys which reference the given column
static java.util.List getMatchedColumnUniqueConstraint(BaseTable table, Column column)
          Returns all the unique constraints of the given table which only reference the given column
static java.util.List getNotNullableColumns(BaseTable table)
          Returns the columns list which is not nullable
static boolean isReferencedColumn(BaseTable table, Column column)
          Checks if the given column is referenced in one of the reference constraints of the given table
static void removeColumnFromRefConstraints(BaseTable table, Column column)
           
static void removePrivilegeForColumn(Column column, java.util.List authids)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableModelUtil

public TableModelUtil()
Method Detail

getMatchedColumnUniqueConstraint

public static java.util.List getMatchedColumnUniqueConstraint(BaseTable table,
                                                              Column column)
Returns all the unique constraints of the given table which only reference the given column

Parameters:
table - the base table
column - the referencing column
Returns:

getMatchedColumnCheckConstraint

public static java.util.List getMatchedColumnCheckConstraint(BaseTable table,
                                                             Column column)

getMatchedColumnForeignKeys

public static java.util.List getMatchedColumnForeignKeys(BaseTable table,
                                                         Column column)
Returns all the foreign keys which reference the given column

Parameters:
table -
column -
Returns:

isReferencedColumn

public static boolean isReferencedColumn(BaseTable table,
                                         Column column)
Checks if the given column is referenced in one of the reference constraints of the given table

Parameters:
table -
column -
Returns:

removeColumnFromRefConstraints

public static void removeColumnFromRefConstraints(BaseTable table,
                                                  Column column)

removePrivilegeForColumn

public static void removePrivilegeForColumn(Column column,
                                            java.util.List authids)

getNotNullableColumns

public static java.util.List getNotNullableColumns(BaseTable table)
Returns the columns list which is not nullable

Parameters:
table -
Returns:

constructConstraintNamesList

public static java.lang.String constructConstraintNamesList(java.util.List matches)