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>
public abstract class JdbcRepository<T,ID>
extends dev.relism.flash.ext.data.core.Repository<T,ID>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJdbcRepository(dev.relism.flash.ext.data.core.Tx tx, String table, String idColumn) -
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(dev.relism.flash.ext.data.core.Spec<T> spec) protected voiddoDeleteById(ID id) protected booleandoExistsById(ID id) doFindById(ID id) protected dev.relism.flash.ext.data.core.Page<T> doFindPage(dev.relism.flash.ext.data.core.Query<T> query) protected Tprotected Tprotected intdoUpdateAll(dev.relism.flash.ext.data.core.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
-
doFind
-
doFindOne
-
doFindPage
-
doExistsById
-
doCount
protected long doCount() -
doSave
-
doSaveAll
-
doUpdate
-
doDelete
-
doDeleteById
-
doDeleteAll
-
doUpdateAll
-
queryOne
-
queryOne
protected <R> Optional<R> queryOne(String sql, JdbcRepository.SqlBinder params, JdbcRepository.SqlMapper<R> mapper) -
queryMany
-
mutate
-
applyGeneratedKey
- Throws:
SQLException
-
entityType
-