Class ExtendedPanacheRepositoryBase<F,E extends F>
java.lang.Object
io.clonecloudstore.common.database.postgre.ExtendedPanacheRepositoryBase<F,E>
- Type Parameters:
E- the type for the DTO to use
- All Implemented Interfaces:
RepositoryBaseInterface<F>,io.quarkus.hibernate.orm.panache.PanacheRepositoryBase<E,String>
public abstract class ExtendedPanacheRepositoryBase<F,E extends F>
extends Object
implements io.quarkus.hibernate.orm.panache.PanacheRepositoryBase<E,String>, RepositoryBaseInterface<F>
The base Postgre implementation of the RepositoryBaseInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PostgreBulkHelperprotected final PostgreStreamHelper<F, E> Fields inherited from interface io.clonecloudstore.common.database.utils.RepositoryBaseInterface
ID, ID_PG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToInsertBulk(F so) SHall be in an enclosing Transactional to enforce bulk effectsaddToUpdateBulk(F so) SHall be in an enclosing Transactional to enforce bulk effectsprotected voidchangeBulkSize(int bulkSize) longlongcountAll()longlongvoiddeleteWithPk(String pk) Delete the item according to the Primary KeyfindIterator(DbQuery query) org.hibernate.query.Query<E> Build the SELECT Hibernate Query from the DbQueryfindStream(DbQuery query) findWithPk(String pk) voidflushAll()Force flush of all remaining bulk items, and if supported other itemsprotected intorg.hibernate.query.Query<E> getSelectQuery(DbQuery dbQuery) Build the SELECT Hibernate Query from the DbQueryvoidbooleanlongbooleanupdateFull(F item) Update fully this EMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.hibernate.orm.panache.PanacheRepositoryBase
count, count, count, count, delete, delete, delete, delete, deleteAll, deleteById, find, find, find, find, find, find, findAll, findAll, findById, findById, findByIdOptional, findByIdOptional, flush, getEntityManager, isPersistent, list, list, list, list, list, list, listAll, listAll, persist, persist, persist, persist, persistAndFlush, stream, stream, stream, stream, stream, stream, streamAll, streamAll, update, update, updateMethods inherited from interface io.clonecloudstore.common.database.utils.RepositoryBaseInterface
createEmptyItem, getPkName, getTable
-
Field Details
-
streamHelper
-
helper
-
-
Constructor Details
-
ExtendedPanacheRepositoryBase
-
-
Method Details
-
isSqlRepository
public boolean isSqlRepository()- Specified by:
isSqlRepositoryin interfaceRepositoryBaseInterface<F>- Returns:
- True if SQL based repository, else False (NoSQL)
-
changeBulkSize
protected void changeBulkSize(int bulkSize) -
getBulkSize
protected int getBulkSize() -
addToInsertBulk
SHall be in an enclosing Transactional to enforce bulk effects- Specified by:
addToInsertBulkin interfaceRepositoryBaseInterface<F>- Parameters:
so- the item to bulk (insert/update)- Returns:
- this
- Throws:
CcsDbException
-
addToUpdateBulk
SHall be in an enclosing Transactional to enforce bulk effects- Throws:
CcsDbException
-
flushAll
Description copied from interface:RepositoryBaseInterfaceForce flush of all remaining bulk items, and if supported other items- Specified by:
flushAllin interfaceRepositoryBaseInterface<F>- Throws:
CcsDbException
-
findOne
- Specified by:
findOnein interfaceRepositoryBaseInterface<F>- Parameters:
query- the where condition- Returns:
- the item according to the query
- Throws:
CcsDbException
-
findWithPk
- Specified by:
findWithPkin interfaceRepositoryBaseInterface<F>- Parameters:
pk- the Primary Key as String- Returns:
- the item according to the Primary Key
- Throws:
CcsDbException
-
deleteWithPk
Description copied from interface:RepositoryBaseInterfaceDelete the item according to the Primary Key- Specified by:
deleteWithPkin interfaceRepositoryBaseInterface<F>- Parameters:
pk- the Primary Key as String- Throws:
CcsDbException
-
findStream
- Specified by:
findStreamin interfaceRepositoryBaseInterface<F>- Parameters:
query- the where condition- Returns:
- the Stream (real one) based on Query (where condition)
- Throws:
CcsDbException
-
findIterator
- Specified by:
findIteratorin interfaceRepositoryBaseInterface<F>- Parameters:
query- the where condition- Returns:
- the iterator based on Query (where condition)
- Throws:
CcsDbException
-
count
- Specified by:
countin interfaceRepositoryBaseInterface<F>- Parameters:
query- the where condition- Returns:
- the count based on Query (where condition)
- Throws:
CcsDbException
-
countAll
- Specified by:
countAllin interfaceRepositoryBaseInterface<F>- Returns:
- the total number of rows
- Throws:
CcsDbException
-
deleteAllDb
- Specified by:
deleteAllDbin interfaceRepositoryBaseInterface<F>- Returns:
- the total number of deleted rows
- Throws:
CcsDbException
-
delete
- Specified by:
deletein interfaceRepositoryBaseInterface<F>- Parameters:
query- the where condition- Returns:
- the count of deleted items based on Query (where condition)
- Throws:
CcsDbException
-
update
- Specified by:
updatein interfaceRepositoryBaseInterface<F>- Parameters:
query- the where conditionupdate- the update part- Returns:
- the count of updated items based on Query (where condition) and the Update
- Throws:
CcsDbException
-
updateFull
Description copied from interface:RepositoryBaseInterfaceUpdate fully this E- Specified by:
updateFullin interfaceRepositoryBaseInterface<F>- Returns:
- True if ok
- Throws:
CcsDbException
-
insert
- Specified by:
insertin interfaceRepositoryBaseInterface<F>- Parameters:
item- the item to insert- Throws:
CcsDbException
-
findQuery
Build the SELECT Hibernate Query from the DbQuery- Throws:
CcsDbException
-
getSelectQuery
Build the SELECT Hibernate Query from the DbQuery- Throws:
CcsDbException
-