Modifier and Type | Field and Description |
---|---|
protected static java.util.regex.Pattern |
orderByPattern |
protected java.lang.String |
tableName |
con, dateFormat_DDMMYYYY, dateFormat_DDMMYYYY_HHMM, log, SQL_AND, SQL_DELETE, SQL_DESC, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT, SQL_LEFT_JOIN, SQL_LIMIT, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UPDATE, SQL_WHERE
Constructor and Description |
---|
AbstractDAO(java.sql.Connection con,
java.lang.String tableName) |
AbstractDAO(java.sql.Connection con,
java.lang.String tableName,
java.util.Date date) |
Modifier and Type | Method and Description |
---|---|
int |
delete(int id) |
protected int |
deleteById(int id) |
protected int |
deleteImpl(int id) |
B |
get(int id) |
protected B |
get(java.lang.String filter,
java.lang.Object... params) |
protected B |
getById(int id) |
protected abstract B |
getFromRS(java.sql.ResultSet rs) |
protected B |
getImpl(int id) |
protected void |
getListFromRS(java.sql.ResultSet rs,
java.util.List<B> result) |
protected java.lang.String |
getTableName(java.lang.String tableName,
java.util.Date date) |
protected java.util.List<B> |
list(java.lang.String filter,
java.lang.String orderBy,
java.lang.Object... params) |
protected java.util.List<B> |
listImpl(java.lang.String filter,
java.lang.String orderBy,
java.lang.Object... params) |
protected void |
processException(java.sql.SQLException e) |
void |
update(B b) |
protected abstract void |
updateImpl(B b) |
addLikeSql, convertDateToSqlDate, convertDateToTimestamp, deleteById, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, updateColumn, updateIds, updateIds
protected final java.lang.String tableName
protected static final java.util.regex.Pattern orderByPattern
public AbstractDAO(java.sql.Connection con, java.lang.String tableName)
public AbstractDAO(java.sql.Connection con, java.lang.String tableName, java.util.Date date)
protected java.lang.String getTableName(java.lang.String tableName, java.util.Date date)
protected void processException(java.sql.SQLException e) throws BGException
BGException
public void update(B b) throws BGException
BGException
protected abstract void updateImpl(B b) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
public B get(int id) throws BGException
BGException
protected B getImpl(int id) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
protected B getById(int id) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
protected java.util.List<B> list(java.lang.String filter, java.lang.String orderBy, java.lang.Object... params) throws BGException
BGException
protected B get(java.lang.String filter, java.lang.Object... params) throws BGException
BGException
protected java.util.List<B> listImpl(java.lang.String filter, java.lang.String orderBy, java.lang.Object... params) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
protected abstract B getFromRS(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
protected void getListFromRS(java.sql.ResultSet rs, java.util.List<B> result) throws java.sql.SQLException
java.sql.SQLException
public int delete(int id) throws BGException
BGException
protected int deleteImpl(int id) throws BGException, java.sql.SQLException
BGException
java.sql.SQLException
protected int deleteById(int id) throws java.sql.SQLException
java.sql.SQLException