public class JDBCUnit extends JDBCTable
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap |
cache |
protected java.sql.PreparedStatement |
getDBIdStmt |
protected java.sql.PreparedStatement |
getStmt |
protected java.sql.PreparedStatement |
putStmt |
Constructor and Description |
---|
JDBCUnit(java.sql.Connection conn) |
Modifier and Type | Method and Description |
---|---|
protected void |
createCache() |
Unit |
get(int dbid) |
int |
getDBId(Unit aUnit) |
int |
put(UnitImpl aUnit)
adds the unit to database
|
static UnitBase |
stringToBase(java.lang.String inString) |
getConnection, getTableName
protected java.sql.PreparedStatement putStmt
protected java.sql.PreparedStatement getDBIdStmt
protected java.sql.PreparedStatement getStmt
protected java.util.HashMap cache
public JDBCUnit(java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public Unit get(int dbid) throws java.sql.SQLException, NotFound
java.sql.SQLException
NotFound
public int put(UnitImpl aUnit) throws java.sql.SQLException
java.sql.SQLException
public int getDBId(Unit aUnit) throws java.sql.SQLException, NotFound
java.sql.SQLException
NotFound
public static final UnitBase stringToBase(java.lang.String inString)
protected void createCache() throws java.sql.SQLException
java.sql.SQLException