Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.objectstyle.ashwood.dbutil
Class Table  view Table download Table.java

java.lang.Object
  extended byorg.objectstyle.ashwood.dbutil.Table
All Implemented Interfaces:
java.io.Serializable

public class Table
extends java.lang.Object
implements java.io.Serializable


Field Summary
private  java.lang.String catalog
           
private  java.util.Collection columns
           
private  java.util.Collection foreignKeys
           
private  java.lang.String name
           
private  java.util.Collection primaryKeys
           
private  java.lang.String schema
           
 
Constructor Summary
Table()
           
Table(java.lang.String catalog, java.lang.String schema, java.lang.String name)
           
 
Method Summary
 void addColumn(Column column)
           
 void addForeignKey(ForeignKey foreignKey)
           
 void addPrimaryKey(PrimaryKey primaryKey)
           
static java.lang.String composeFullName(java.lang.String catalog, java.lang.String schema, java.lang.String tableName)
           
 java.lang.String getCatalog()
           
 java.util.Collection getColumns()
           
 java.util.Collection getForeignKeys()
           
 java.lang.String getFullName()
           
 java.lang.String getName()
           
 java.util.Collection getPrimaryKeys()
           
 java.lang.String getSchema()
           
 void refresh(java.sql.DatabaseMetaData metaData)
           
 void refreshColumns(java.sql.DatabaseMetaData metaData)
           
 void refreshForeignKeys(java.sql.DatabaseMetaData metaData)
           
 void refreshPrimaryKeys(java.sql.DatabaseMetaData metaData)
           
 boolean removeColumn(Column column)
           
 boolean removeForeignKey(ForeignKey foreignKey)
           
 boolean removePrimaryKey(PrimaryKey primaryKey)
           
 void setCatalog(java.lang.String catalog)
           
 void setName(java.lang.String name)
           
 void setSchema(java.lang.String schema)
           
 void toCreateSQL(java.io.PrintWriter out)
           
 void toDropSQL(java.io.PrintWriter out)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

catalog

private java.lang.String catalog

schema

private java.lang.String schema

name

private java.lang.String name

columns

private java.util.Collection columns

foreignKeys

private java.util.Collection foreignKeys

primaryKeys

private java.util.Collection primaryKeys
Constructor Detail

Table

public Table()

Table

public Table(java.lang.String catalog,
             java.lang.String schema,
             java.lang.String name)
Method Detail

getCatalog

public java.lang.String getCatalog()

setCatalog

public void setCatalog(java.lang.String catalog)

setSchema

public void setSchema(java.lang.String schema)

getSchema

public java.lang.String getSchema()

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


composeFullName

public static java.lang.String composeFullName(java.lang.String catalog,
                                               java.lang.String schema,
                                               java.lang.String tableName)

getFullName

public java.lang.String getFullName()

refreshColumns

public void refreshColumns(java.sql.DatabaseMetaData metaData)
                    throws java.sql.SQLException

refreshPrimaryKeys

public void refreshPrimaryKeys(java.sql.DatabaseMetaData metaData)
                        throws java.sql.SQLException

refreshForeignKeys

public void refreshForeignKeys(java.sql.DatabaseMetaData metaData)
                        throws java.sql.SQLException

refresh

public void refresh(java.sql.DatabaseMetaData metaData)
             throws java.sql.SQLException

getPrimaryKeys

public java.util.Collection getPrimaryKeys()

getForeignKeys

public java.util.Collection getForeignKeys()

getColumns

public java.util.Collection getColumns()

addColumn

public void addColumn(Column column)

removeColumn

public boolean removeColumn(Column column)

addPrimaryKey

public void addPrimaryKey(PrimaryKey primaryKey)

removePrimaryKey

public boolean removePrimaryKey(PrimaryKey primaryKey)

addForeignKey

public void addForeignKey(ForeignKey foreignKey)

removeForeignKey

public boolean removeForeignKey(ForeignKey foreignKey)

toCreateSQL

public void toCreateSQL(java.io.PrintWriter out)

toDropSQL

public void toDropSQL(java.io.PrintWriter out)