com.partnersoft.sql
Class SqlTable

java.lang.Object
  extended by com.partnersoft.sql.SqlTable

public class SqlTable
extends java.lang.Object

A table in an SqlDatabase. Provides tools for examining, querying, and altering the table.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
SqlTable(SqlConnection connection, java.lang.String name)
           
 
Method Summary
 void create(java.util.List<SqlColumn> columns)
           
 void drop()
           
 boolean exists()
           
 SqlConnection getConnection()
           
 java.lang.String getName()
           
 java.util.List<java.lang.String> listColumnNames()
           
 java.util.List<java.lang.String> listKeyColumnNames()
           
 java.util.List<java.lang.String> listNonKeyColumnNames()
           
 void refresh()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlTable

public SqlTable(SqlConnection connection,
                java.lang.String name)
         throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

getConnection

public SqlConnection getConnection()

getName

public java.lang.String getName()

exists

public boolean exists()

refresh

public void refresh()
             throws java.sql.SQLException
Throws:
java.sql.SQLException

listColumnNames

public java.util.List<java.lang.String> listColumnNames()

listKeyColumnNames

public java.util.List<java.lang.String> listKeyColumnNames()

listNonKeyColumnNames

public java.util.List<java.lang.String> listNonKeyColumnNames()

drop

public void drop()
          throws java.sql.SQLException
Throws:
java.sql.SQLException

create

public void create(java.util.List<SqlColumn> columns)
            throws java.sql.SQLException
Throws:
java.sql.SQLException