Package dev.relism.flash.ext.data.jdbc
Class JdbcRepository<T,ID>
java.lang.Object
dev.relism.flash.ext.data.core.RepositorySupport<T,ID>
dev.relism.flash.ext.data.core.Repository<T,ID>
dev.relism.flash.ext.data.jdbc.JdbcRepository<T,ID>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyGeneratedKey(PreparedStatement ps, T entity) protected abstract voidbindInsert(PreparedStatement ps, T entity) protected abstract voidbindUpdate(PreparedStatement ps, T entity) protected Connectionprotected longdoCount()protected voidprotected intdoDeleteAll(Spec<T> spec) protected voiddoDeleteById(ID id) protected booleandoExistsById(ID id) doFindById(ID id) doFindPage(Query<T> query) protected Tprotected Tprotected intdoUpdateAll(Spec<T> spec, T patch) protected abstract Stringprotected abstract Tprotected intmutate(String sql, JdbcRepository.SqlBinder params) queryMany(String sql, JdbcRepository.SqlBinder params) queryOne(String sql, JdbcRepository.SqlBinder params) protected <R> Optional<R> queryOne(String sql, JdbcRepository.SqlBinder params, JdbcRepository.SqlMapper<R> mapper) protected abstract StringMethods inherited from class dev.relism.flash.ext.data.core.Repository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAll, findAll, findAll, findAll, findAll, findById, findOne, findPage, findPage, findPage, save, saveAll, update, updateAllMethods inherited from class dev.relism.flash.ext.data.core.RepositorySupport
roQuery, rwQuery, tx
-
Constructor Details
-
JdbcRepository
-
-
Method Details
-
connection
-
mapRow
- Throws:
SQLException
-
bindInsert
- Throws:
SQLException
-
bindUpdate
- Throws:
SQLException
-
insertSql
-
updateSql
-
doFindById
- Specified by:
doFindByIdin classRepository<T,ID>
-
doFind
- Specified by:
doFindin classRepository<T,ID>
-
doFindOne
- Specified by:
doFindOnein classRepository<T,ID>
-
doFindPage
- Specified by:
doFindPagein classRepository<T,ID>
-
doExistsById
- Specified by:
doExistsByIdin classRepository<T,ID>
-
doCount
protected long doCount()- Specified by:
doCountin classRepository<T,ID>
-
doSave
- Specified by:
doSavein classRepository<T,ID>
-
doSaveAll
- Specified by:
doSaveAllin classRepository<T,ID>
-
doUpdate
- Specified by:
doUpdatein classRepository<T,ID>
-
doDelete
- Specified by:
doDeletein classRepository<T,ID>
-
doDeleteById
- Specified by:
doDeleteByIdin classRepository<T,ID>
-
doDeleteAll
- Specified by:
doDeleteAllin classRepository<T,ID>
-
doUpdateAll
- Specified by:
doUpdateAllin classRepository<T,ID>
-
queryOne
-
queryOne
protected <R> Optional<R> queryOne(String sql, JdbcRepository.SqlBinder params, JdbcRepository.SqlMapper<R> mapper) -
queryMany
-
mutate
-
applyGeneratedKey
- Throws:
SQLException
-
entityType
-