Class ExtendedPanacheMongoRepositoryBase<F,E extends F>
java.lang.Object
io.clonecloudstore.common.database.mongo.ExtendedPanacheMongoRepositoryBase<F,E>
- Type Parameters:
E- the type for the DTO to use
- All Implemented Interfaces:
RepositoryBaseInterface<F>,io.quarkus.mongodb.panache.PanacheMongoRepositoryBase<E,String>
- Direct Known Subclasses:
MgDaoAccessorBucketRepository,MgDaoAccessorObjectRepository,MgDaoNativeListingRepository,MgDaoOwnershipRepository,MgDaoRequestRepository,MgDaoSitesActionRepository,MgDaoSitesListingRepository,MgDaoTopologyRepository
public abstract class ExtendedPanacheMongoRepositoryBase<F,E extends F>
extends Object
implements io.quarkus.mongodb.panache.PanacheMongoRepositoryBase<E,String>, RepositoryBaseInterface<F>
The base Mongo implementation of the RepositoryBaseInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MongoBulkInsertHelper<F, E> static final Stringprotected final MongoStreamHelper<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) Add one element to an insert bulk operationaddToUpdateBulk(org.bson.Document find, org.bson.Document update) addToUpsertBulk(org.bson.Document find, F update) longlongcountAll()longlongvoiddeleteWithPk(String pk) Delete the item according to the Primary KeyfindIterator(DbQuery query) findIterator(org.bson.Document query) findStream(DbQuery query) findWithPk(String pk) voidflushAll()Force flush of all remaining bulk items, and if supported other itemsvoidbooleanlongbooleanupdateFull(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.mongodb.panache.PanacheMongoRepositoryBase
count, count, count, count, count, delete, delete, delete, delete, delete, deleteAll, deleteById, find, find, find, find, find, find, find, find, findAll, findAll, findById, findByIdOptional, list, list, list, list, list, list, list, list, listAll, listAll, mongoCollection, mongoDatabase, persist, persist, persist, persist, persistOrUpdate, persistOrUpdate, persistOrUpdate, persistOrUpdate, stream, stream, stream, stream, stream, stream, stream, stream, streamAll, streamAll, update, update, update, update, update, update, update, updateMethods inherited from interface io.clonecloudstore.common.database.utils.RepositoryBaseInterface
createEmptyItem, getPkName, getTable
-
Field Details
-
ISSUE_WITH_SERIALIZATION
- See Also:
-
helper
-
streamHelper
-
-
Constructor Details
-
ExtendedPanacheMongoRepositoryBase
public ExtendedPanacheMongoRepositoryBase()
-
-
Method Details
-
isSqlRepository
public boolean isSqlRepository()- Specified by:
isSqlRepositoryin interfaceRepositoryBaseInterface<F>- Returns:
- True if SQL based repository, else False (NoSQL)
-
addToInsertBulk
Description copied from interface:RepositoryBaseInterfaceAdd one element to an insert bulk operation- Specified by:
addToInsertBulkin interfaceRepositoryBaseInterface<F>- Parameters:
so- the item to bulk (insert/update)- Returns:
- this
- Throws:
CcsDbException
-
addToUpsertBulk
public ExtendedPanacheMongoRepositoryBase<F,E> addToUpsertBulk(org.bson.Document find, F update) throws CcsDbException - Throws:
CcsDbException
-
addToUpdateBulk
public ExtendedPanacheMongoRepositoryBase<F,E> addToUpdateBulk(org.bson.Document find, org.bson.Document update) throws CcsDbException - 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
-
findIterator
- 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
-