public abstract class Table extends Object
Modifier and Type | Field and Description |
---|---|
protected SQLDB |
db |
protected String |
tableName |
protected boolean |
usingMySQL |
Constructor and Description |
---|
Table(String name,
SQLDB db,
boolean usingMySQL) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(AutoCloseable toClose) |
abstract boolean |
createTable() |
protected boolean |
execute(String sql) |
protected Connection |
getConnection() |
String |
getTableName() |
int |
getVersion() |
protected PreparedStatement |
prepareStatement(String sql) |
boolean |
removeAllData() |
protected String tableName
protected SQLDB db
protected boolean usingMySQL
public abstract boolean createTable()
protected Connection getConnection() throws SQLException
SQLException
public int getVersion() throws SQLException
SQLException
protected boolean execute(String sql) throws SQLException
sql
- SQLException
protected PreparedStatement prepareStatement(String sql) throws SQLException
sql
- SQLException
protected void close(AutoCloseable toClose)
toClose
- public String getTableName()
public boolean removeAllData()
Copyright © 2017. All rights reserved.