- Typo fixed.
- New interfaces and classes:
INamedParamsFilter
: abstract interface to build SQL's "filter" statement (WHERE/HAVING/etc) with named-parameters.DefaultNamedParamsFilters
: default implementations ofINamedParamsFilter
INamedParamsSqlBuilder
: abstract interface to build SQL statements with named-parametersDefaultNamedParramsSqlBuilders
: default implementations ofINamedParamsSqlBuilder
BuildNamedParamsSqlResult
: capture the result returned fromINamedParamsSqlBuilder.build()
orINamedParamsFilter.build()
- Other fixes and enhancements; remove deprecated classes.
- Migrate to
Java 11
. - Refactoring & Clean-up deprecated methods/classes.
- Redesign NoSQL support:
- Fixes & Enhancements:
GenericBoJdbcDao<T>
:- New flag
upsertInTransaction
: if set totrue
,createOrUpdate()
andupdateOrCreate
will be wrapped in a transaction. protected DaoResult create(Connection, T)
: roll-back to save-point in case of duplicated value exception.protected DaoResult update(Connection, T)
: roll-back to save-point in case of duplicated value exception.
- New flag
- Fixes & Enhancements:
GenericBoJdbcDao<T>
: renderSQL_xxx
queries tonull
if not be able to fully rendered.
- Bug fixed: class
GenericBoJdbcDao<T>
must be abstract in order to correctly detect the generic typed parameter!
IGenericBoDao
: new methodsStream<T> getAll()
andStream<T> getAllSorted()
- New interface/class:
IGenericMultiBoDao
andGenericMultiBoJdbcDao
- (Breaking change) rename
AbstractGenericBoJdbcDao
toGenericBoJdbcDao
, and implement methodsStream<T> getAll()
andStream<T> getAllSorted()
- (Breaking change)
PrimaryKeyColumns
rename attributecolumns
tovalue
- (Breaking change)
UpdateColumns
rename attributecolumns
tovalue
IJdbcHelper
:executeSelectAsStream(...)
now supports auto closing the suppliedConnection
.
- Update dependency libs.
AbstractGenericRowMapper
: add utility method to generate SQLs for SELECT, INSERT, DELETE, UPDATE.- Bug fixes & Enhancements:
AbstractGenericBoJdbcDao
andAbstractGenericRowMapper
now supports the typed parameter is a typed class (e.g.MyRowMapper extends AbstractGenericRowMapper<AGeneticClass<T>>
).
- Update dependency libs.
BaseDao
: in case ofCacheException
, operation should not fail:- Put, Remove: log exception with
warn
level. - Get: log exception with
warn
level and returnnull
.
- Put, Remove: log exception with
- Support streaming of result from a SELECT query:
- New class
ResultSetIterator
. - New methods
IJdbcHelper.executeSelectAsStream(...)
- New class
- Refactoring & Enhancements:
- New class
UniversalRowMapper
: implementsIRowMapper<Map<String, Object>>
- New helper class
JdbcHelper
- Both
DdthJdbcHelper
andJdbcTemplateJdbcHelper
now supportIN
clause (named-parameters only)
- New class
BaseBo
: new methodspublic Map<String, Object> getAttributes()
andpublic BaseBo setAttributes(Map<String, Object>)
.- New method and enum to detect db vendor:
DatabaseVendor
andDbcHelper.detectDbVendor(Connection)
- Other fixes and improvements
- Exception:
- Keep only
DaoException
andDuplicatedValueException
- Remove
DuplicatedUniqueException
andMissingValueException
- Keep only
- Rename
DaoOperationStatus.DUPLICATED_KEY
toDaoOperationStatus.DUPLICATED_VALUE
DaoOperationStatus.DUPLICATED_UNIQUE
is now deprecatedAbstractJdbcHelper
: translatesSQLException
toDaoException
- New method
DbcHelper.getDataSource(Connection)
- Fixes and enhancements
- Add support for
checksum
column:- New annotation
ChecksumColumn
AbstractGenericRowMapper
,AnnotatedGenericRowMapper
&&AbstractGenericBoJdbcDao
: support checksum column.
- New annotation
IGenericBoDao
&&AbstractGenericBoJdbcDao
: new methodscreateOrUpdate(bo)
andupdateOrCreate(bo)
.IJdbcHelper
,AbstractJdbcHelper
andBaseJdbcDao
: support multiple data-sources.AbstractGenericBoJdbcDao
: add protected version of public methods.- Fix:
AnnotatedGenericRowMapper.getAllColumns()
now returns columns in correct order. - Fix:
AbstractJdbcHelper
bug that caused pre-opened connection to be closed.
- Fixes/Enhancements:
AbstractGenericBoJdbcDao
: protected method to retrievetypeClass
member attribute in sub-classes.AbstractGenericRowMapper
:- Constructor: proper way to retrieve value for
typeClass
- Protected method to retrieve
typeClass
member attribute in sub-classes. - Provide a way for
mapRow(...)
to pass custom class loader toBoUtils.createObject(...)
- Constructor: proper way to retrieve value for
AbstractGenericRowMapper.ColAttrMapping
: attribute class can be either primitive or wrapper.AbstractGenericBoJdbcDao
new methods to support data partitioning & custom queries:protected String calcTableName(BoId id)
andprotected String calcTableName(T bo)
protected String calcSqlInsert(BoId id)
andprotected String calcSqlInsert(T bo)
protected String calcSqlDeleteOne(BoId id)
andprotected String calcSqlDeleteOne(T bo)
protected String calcSqlSelectOne(BoId id)
andprotected String calcSqlSelectOne(T bo)
protected String calcSqlUpdateOne(BoId id)
andprotected String calcSqlUpdateOne(T bo)
AbstractGenericBoJdbcDao
: various bugs fixed
BaseBo
: new methods<T> Optional<T> getAttributeOptional(String attrName, Class<T> clazz)
Date getAttributeAsDate(String attrName, String dateTimeFormat)
- New class
BaseDataJsonFieldBo
BaseJsonBo
: new method<T> Optional<T> getSubAttrOptional(String attrName, String dPath, Class<T> clazz)
- New class
BoId
. - New interface
IGenericBoDao<T>
: API interface for DAO that manages one single BO class.- New class
AbstractGenericBoJdbcDao<T>
- New class
- New class
AbstractGenericRowMapper<T>
- New package
com.github.ddth.dao.jdbc.annotations
- New classes
AbstractJdbcHelper
andDdthJdbcHelper
DdthJdbcHelper
: pure-JDBC implementation (does not depends on Spring'sJdbcTemplate
)- Support binding of value array.
IJdbcHelper
now supports both index-based and name-based value bindings.DbcHelper
: new methodpublic static void bindParams(PreparedStatement pstm, Object... bindValues) throws SQLException
- New exception classes:
DaoException
DuplicatedKeyException
DuplicatedUniqueException
MissingValueException
DdthJdbcHelper
andJdbcTemplateJdbcHelper
now throwDaoException
instead ofSQLException
ParamExpression
is deprecated, wait for future rework.- Update & Upgrade dependencies.
- Refactor & More unit tests.
- Breaking change:
BaseBo.getAttribute(String)
andBaseBo.getAttribute(String, Class)
no longer delegates toDPathUtils.getValue()
but toMapUtils.getValue(...)
.- The same to
BaseBo.setAttribute(String, Object)
.
BaseBo.setAttribute(String key, Object value)
: if value isnull
, the entry is removed from attribute map.BaseBo
: new methods (attributeExists(String)
,attributeMap()
,removeAttribute(String)
,triggerChange(String)
) and improvements.- New class
BaseJsonBo
.
- Refactor
BaseJdbcDao
:- Abstract from
JdbcTemplate
with new interfacesIRowMapper
andIJdbcHelper
. - New class
com.github.ddth.dao.jdbc.jdbctemplate.JdbcTemplateJdbcHelper
- Abstract from
- Update dependencies.
- Minor fixes & enhancements.
- Bump to
com.github.ddth:ddth-parent:6
, now requires Java 8+. BaseBo
now implementsISerializationSupport
interface.- New utility class
BoUtils
. - BREAKING CHANGE:
ProfilingRecord
's structure changes:execTime
: UNIX timestamp (in milliseconds) when the command started.duration
: command's duration in milliseconds
- BREAKING CHANGE:
BaseBo
'stoXXX()
andfromXXX()
have changed their internal mechanism! - Update dependencies.
- Minor fixes & enhancements.
BaseBo
now implements interfaceCloneable
.
- Minor enhancements: no more
synchronized
methods in classBaseBo
. BaseBo
: New methodprotected void triggerPopulate()
- POM fixed.
- Separate artifacts:
ddth-dao-core
,ddth-dao-jdbc
andddth-dao-cassandra
.
- Minor enhancements: new transaction-support methods for class
BaseJdbcDao
- Bugs fixed.
- New methods in class
DbcHelper
: - Bugs fixed.
- Minor *QL profiling enhancements.
BaseBo
: remove field__dirty__
from serialized form.WideRowJsonCassandraNosqlEngine
: bug fix in methodvoid store(String tableName, String entryId, Map<Object, Object> data)
- NoSQL DAO: new method
Collection<String> entryIdList(String storageId)
- New package(s)
com.github.ddth.dao.nosql.*
to support NoSQL-DAOs. - Support NoSQL engine:
Apache Cassandra
.
- Moved class
DbcHelper
to packagecom.github.ddth.dao.jdbc
. BaseJdbcDao
's methods utilizeDbcHelper
.- Changed parameters of
SqlHelper.buildSqlSELECT()
.
- First release.