com.partnersoft.maps.database
Class RoverTable<T>

java.lang.Object
  extended by com.partnersoft.maps.database.RoverTable<T>
Direct Known Subclasses:
RoverDataTable, RoverFindItemTable, RoverImageFileTable, RoverShapeTable

public abstract class RoverTable<T>
extends java.lang.Object


Constructor Summary
protected RoverTable(RoverDatabase database, java.lang.String name)
           
protected RoverTable(RoverDatabase database, java.lang.String name, java.lang.String... fieldNames)
           
 
Method Summary
 void clear()
           
abstract  void create()
           
abstract  void delete(T oldRecord)
           
 void drop()
           
 RoverDatabase getDatabase()
           
protected  SqlDeleter getDeleter()
           
protected  SqlInserter getInserter()
           
 int getLastGeneratedId()
           
 SqlTable getTable()
           
protected  SqlUpdater getUpdater()
           
abstract  int insert(int dataId, T newRecord)
           
abstract  T recordWithId(int id)
           
abstract  void update(T updatedRecord)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoverTable

protected RoverTable(RoverDatabase database,
                     java.lang.String name)
              throws java.sql.SQLException
Throws:
java.sql.SQLException

RoverTable

protected RoverTable(RoverDatabase database,
                     java.lang.String name,
                     java.lang.String... fieldNames)
              throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

create

public abstract void create()
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

insert

public abstract int insert(int dataId,
                           T newRecord)
                    throws java.sql.SQLException,
                           java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

delete

public abstract void delete(T oldRecord)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

update

public abstract void update(T updatedRecord)
                     throws java.sql.SQLException,
                            java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

recordWithId

public abstract T recordWithId(int id)
                        throws java.sql.SQLException,
                               java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

drop

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

clear

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

getLastGeneratedId

public int getLastGeneratedId()
                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getDatabase

public RoverDatabase getDatabase()

getTable

public SqlTable getTable()

getDeleter

protected SqlDeleter getDeleter()
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getInserter

protected SqlInserter getInserter()
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

getUpdater

protected SqlUpdater getUpdater()
                         throws java.sql.SQLException
Throws:
java.sql.SQLException