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

Quick Search    Search Deep

javatools.db
Class DbAbstractTable  view DbAbstractTable download DbAbstractTable.java

java.lang.Object
  extended byjavatools.db.AbstractTable
      extended byjavatools.db.DbAbstractTable
All Implemented Interfaces:
DbTableUser
Direct Known Subclasses:
DbFixedAbstractTable, DbJoinedTable, DbTable

public abstract class DbAbstractTable
extends AbstractTable

Version:
0.2.0

Field Summary
protected  DbDatabase db
           
 
Fields inherited from class javatools.db.AbstractTable
colNameMap, displaySize, names, tableName, types
 
Constructor Summary
DbAbstractTable(DbDatabase db)
          Creates a new instance of DbAbstractDatabaseTable
 
Method Summary
 DbDeleter deleter()
          Returns a deleter for this table.
abstract  DbColumn getColumn(int index)
          Get the column of the given index.
abstract  DbColumn getColumn(java.lang.String name)
          Get the DbColumn representing the column with this name.
abstract  DbConstraint getConstraint()
          Returns the DbConstraint object associated with this table.
 DbDatabase getDatabase()
          Get the database that this table came from When inheriting, you can pass a "null" value.
abstract  java.lang.Object getDefault(int index)
          Returns the default value for the field at the given index.
abstract  java.lang.Object getDefault(java.lang.String name)
          Returns the default value for the field whose name is specified.
 DbInserter inserter()
          Return an inserter for inserting new data in the database.
 DbInserter inserter(DbSelector selector)
          Return an inserter for inserting new data in the database.
 DbDeleter simpleDeleter()
          Returns a deleter for deleting rows in the database.
 DbInserter simpleInserter()
          Return an inserter for inserting new data in the database.
 DbInserter simpleInserter(DbSelector selector)
          Return an inserter for inserting new data in the database.
 DbUpdater simpleUpdater()
          Return an updater for updating rows in the database.
 DbUpdater updater()
          Returns an updater for this table.
 
Methods inherited from class javatools.db.AbstractTable
equals, getColumnCount, getColumnIndex, getColumnName, getFullTableName, setColumnCount, setColumnName, setTableName, usesTables
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected DbDatabase db
Constructor Detail

DbAbstractTable

public DbAbstractTable(DbDatabase db)
Creates a new instance of DbAbstractDatabaseTable

Method Detail

getDatabase

public DbDatabase getDatabase()
Get the database that this table came from When inheriting, you can pass a "null" value.


getConstraint

public abstract DbConstraint getConstraint()
Returns the DbConstraint object associated with this table.


getColumn

public abstract DbColumn getColumn(java.lang.String name)
                            throws DbException
Get the DbColumn representing the column with this name.


getColumn

public abstract DbColumn getColumn(int index)
                            throws DbException
Get the column of the given index. Index is a zero based array.


getDefault

public abstract java.lang.Object getDefault(int index)
                                     throws DbException
Returns the default value for the field at the given index.


getDefault

public abstract java.lang.Object getDefault(java.lang.String name)
                                     throws DbException
Returns the default value for the field whose name is specified.


inserter

public DbInserter inserter(DbSelector selector)
                    throws DbException
Return an inserter for inserting new data in the database. This method is for SQL of the form INSERT INTO table(...) SELECT ...


simpleInserter

public DbInserter simpleInserter(DbSelector selector)
                          throws DbException
Return an inserter for inserting new data in the database. This method is for SQL of the form INSERT INTO table(...) SELECT ... This inserter DOES NOT take care of constraints.


inserter

public DbInserter inserter()
                    throws DbException
Return an inserter for inserting new data in the database. This method is for SQL of the form INSERT INTO table(...) VALUES(...)


simpleInserter

public DbInserter simpleInserter()
                          throws DbException
Return an inserter for inserting new data in the database. This method is for SQL of the form INSERT INTO table(...) SELECT ... This inserter DOES NOT take care of constraints.


updater

public DbUpdater updater()
                  throws DbException
Returns an updater for this table.


simpleUpdater

public DbUpdater simpleUpdater()
                        throws DbException
Return an updater for updating rows in the database. This updater DOES NOT take care of constraints.


deleter

public DbDeleter deleter()
                  throws DbException
Returns a deleter for this table.


simpleDeleter

public DbDeleter simpleDeleter()
                        throws DbException
Returns a deleter for deleting rows in the database. This deleter takes care of constraints.