Interface RepositoryBaseInterface<E>
- Type Parameters:
E- The Type used by this Repository
- All Known Implementing Classes:
ExtendedPanacheMongoRepositoryBase,ExtendedPanacheRepositoryBase
public interface RepositoryBaseInterface<E>
Interface for Repository for a Database
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddToInsertBulk(E so) Add one element to an insert bulk operationlonglongcountAll()longlongvoiddeleteWithPk(String pk) Delete the item according to the Primary Keyio.clonecloudstore.common.standard.stream.ClosingIterator<E> findIterator(DbQuery query) findStream(DbQuery query) findWithPk(String pk) voidflushAll()Force flush of all remaining bulk items, and if supported other itemsdefault StringgetTable()voidbooleanlongbooleanupdateFull(E e) Update fully this E
-
Field Details
-
ID
Default Primary Key Name (MongoDB)- See Also:
-
ID_PG
Default Primary Key Name (PostgreSQL)- See Also:
-
-
Method Details
-
isSqlRepository
boolean isSqlRepository()- Returns:
- True if SQL based repository, else False (NoSQL)
-
getTable
String getTable()- Returns:
- the table name
-
getPkName
- Returns:
- the Primary Key column name
-
addToInsertBulk
Add one element to an insert bulk operation- Parameters:
so- the item to bulk (insert/update)- Returns:
- this
- Throws:
CcsDbException
-
flushAll
Force flush of all remaining bulk items, and if supported other items- Throws:
CcsDbException
-
findOne
- Parameters:
query- the where condition- Returns:
- the item according to the query
- Throws:
CcsDbException
-
findWithPk
- Parameters:
pk- the Primary Key as String- Returns:
- the item according to the Primary Key
- Throws:
CcsDbException
-
deleteWithPk
Delete the item according to the Primary Key- Parameters:
pk- the Primary Key as String- Throws:
CcsDbException
-
findStream
- Parameters:
query- the where condition- Returns:
- the Stream (real one) based on Query (where condition)
- Throws:
CcsDbException
-
findIterator
io.clonecloudstore.common.standard.stream.ClosingIterator<E> findIterator(DbQuery query) throws CcsDbException - Parameters:
query- the where condition- Returns:
- the iterator based on Query (where condition)
- Throws:
CcsDbException
-
count
- Parameters:
query- the where condition- Returns:
- the count based on Query (where condition)
- Throws:
CcsDbException
-
countAll
- Returns:
- the total number of rows
- Throws:
CcsDbException
-
delete
- Parameters:
query- the where condition- Returns:
- the count of deleted items based on Query (where condition)
- Throws:
CcsDbException
-
deleteAllDb
- Returns:
- the total number of deleted rows
- Throws:
CcsDbException
-
update
- 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
Update fully this E- Returns:
- True if ok
- Throws:
CcsDbException
-
insert
- Parameters:
item- the item to insert- Throws:
CcsDbException
-
createEmptyItem
E createEmptyItem()- Returns:
- an empty item
-