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 String
protected 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) long
long
countAll()
long
long
void
deleteWithPk
(String pk) Delete the item according to the Primary KeyfindIterator
(DbQuery query) findIterator
(org.bson.Document query) findStream
(DbQuery query) findWithPk
(String pk) void
flushAll()
Force flush of all remaining bulk items, and if supported other itemsvoid
boolean
long
boolean
updateFull
(F item) Update fully this EMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, update
Methods 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:
isSqlRepository
in interfaceRepositoryBaseInterface<F>
- Returns:
- True if SQL based repository, else False (NoSQL)
-
addToInsertBulk
Description copied from interface:RepositoryBaseInterface
Add one element to an insert bulk operation- Specified by:
addToInsertBulk
in 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:RepositoryBaseInterface
Force flush of all remaining bulk items, and if supported other items- Specified by:
flushAll
in interfaceRepositoryBaseInterface<F>
- Throws:
CcsDbException
-
findOne
- Specified by:
findOne
in interfaceRepositoryBaseInterface<F>
- Parameters:
query
- the where condition- Returns:
- the item according to the query
- Throws:
CcsDbException
-
findWithPk
- Specified by:
findWithPk
in interfaceRepositoryBaseInterface<F>
- Parameters:
pk
- the Primary Key as String- Returns:
- the item according to the Primary Key
- Throws:
CcsDbException
-
deleteWithPk
Description copied from interface:RepositoryBaseInterface
Delete the item according to the Primary Key- Specified by:
deleteWithPk
in interfaceRepositoryBaseInterface<F>
- Parameters:
pk
- the Primary Key as String- Throws:
CcsDbException
-
findStream
- Specified by:
findStream
in interfaceRepositoryBaseInterface<F>
- Parameters:
query
- the where condition- Returns:
- the Stream (real one) based on Query (where condition)
- Throws:
CcsDbException
-
findIterator
- Specified by:
findIterator
in interfaceRepositoryBaseInterface<F>
- Parameters:
query
- the where condition- Returns:
- the iterator based on Query (where condition)
- Throws:
CcsDbException
-
findIterator
- Throws:
CcsDbException
-
count
- Specified by:
count
in interfaceRepositoryBaseInterface<F>
- Parameters:
query
- the where condition- Returns:
- the count based on Query (where condition)
- Throws:
CcsDbException
-
countAll
- Specified by:
countAll
in interfaceRepositoryBaseInterface<F>
- Returns:
- the total number of rows
- Throws:
CcsDbException
-
deleteAllDb
- Specified by:
deleteAllDb
in interfaceRepositoryBaseInterface<F>
- Returns:
- the total number of deleted rows
- Throws:
CcsDbException
-
delete
- Specified by:
delete
in interfaceRepositoryBaseInterface<F>
- Parameters:
query
- the where condition- Returns:
- the count of deleted items based on Query (where condition)
- Throws:
CcsDbException
-
update
- Specified by:
update
in 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:RepositoryBaseInterface
Update fully this E- Specified by:
updateFull
in interfaceRepositoryBaseInterface<F>
- Returns:
- True if ok
- Throws:
CcsDbException
-
insert
- Specified by:
insert
in interfaceRepositoryBaseInterface<F>
- Parameters:
item
- the item to insert- Throws:
CcsDbException
-