Package lu.kbra.pclib.db.table
Interface AbstractDBTable<T extends DatabaseEntry>
- All Superinterfaces:
SQLQueryable<T>
- All Known Implementing Classes:
DatabaseTable,DBTableProxy,DeferredDatabaseTable
-
Method Summary
Modifier and TypeMethodDescriptionintclear()intcountNotNull(T data) intcountUniques(T data) create()<C extends Collection<T>>
CdeleteAll(C datas) <C extends Collection<T>,D extends Collection<T>>
DdeleteAllIfExists(C datas, Supplier<D> supplier) deleteIfExists(T data) deleteUnique(T data) deleteUniques(T data) drop()booleanexists()booleanbooleanexistsUnique(T data) booleanexistsUniques(T data) <C extends Collection<T>,D extends Collection<T>>
DfilterExists(C datas, Supplier<D> supplier) <C extends Collection<T>,D extends Collection<T>>
DfilterExistsByUnique(C datas, Supplier<D> supplier) <C extends Collection<T>,D extends Collection<T>>
DfilterExistsUnique(C datas, Supplier<D> supplier) String[]<C extends Collection<T>>
CinsertAll(C datas) insertAndReload(T data) <C extends Collection<T>>
CinsertAndReloadAll(C datas) <C extends Collection<T>>
CloadAll(C datas) <C extends Collection<T>,D extends Collection<T>>
DloadAllByUnique(C datas, Supplier<D> supplier) <C extends Collection<T>,D extends Collection<T>>
DloadAllIfExists(C datas, Supplier<D> supplier) <C extends Collection<T>>
CloadAllUnique(C datas) loadByUnique(T data) Returns a list of all the possible entries matching with the unique values of the input.loadIfExists(T data) loadUnique(T data) Loads the only unique result, or throws an exception if none is found.loadUniqueIfExists(T data) Loads the only unique result, returns null if none is found and throws an exception if too many are available.Loads the first unique result, returns a the newly inserted instance if none is found and throws an exception if too many are available.Loads the first unique result, returns null if none is found and throws an exception if too many are available.voidsetQueryableHookManager(SQLQueryableHookManager queryableHookManager) voidsetTableStructure(TableStructure tableStructure) inttruncate()<C extends Collection<T>>
CupdateAll(C datas) updateAndReload(T data) <C extends Collection<T>>
CupdateAndReloadAll(C datas) updateAndReloadIfExists(T data) updateIfExists(T data) updateIfExistsElseInsert(T data) Methods inherited from interface lu.kbra.pclib.db.impl.SQLQueryable
count, getConnector, getDatabaseEntryUtils, getEntryClass, getName, getQualifiedName, getStatementAsSQL, getTargetClass, query
-
Method Details
-
clear
- Throws:
DBException
-
countNotNull
- Throws:
DBException
-
countUniques
- Throws:
DBException
-
create
- Throws:
DBException
-
delete
- Throws:
DBException
-
deleteIfExists
- Throws:
DBException
-
deleteUnique
- Throws:
DBException
-
deleteUniques
- Throws:
DBException
-
drop
- Throws:
DBException
-
exists
- Throws:
DBException
-
exists
- Throws:
DBException
-
existsUnique
- Throws:
DBException
-
existsUniques
- Throws:
DBException
-
getCreateSQL
String[] getCreateSQL() -
getCustomHints
- Specified by:
getCustomHintsin interfaceSQLQueryable<T extends DatabaseEntry>
-
getDatabase
Database getDatabase()- Specified by:
getDatabasein interfaceSQLQueryable<T extends DatabaseEntry>
-
getStructure
TableStructure getStructure()- Specified by:
getStructurein interfaceSQLQueryable<T extends DatabaseEntry>
-
setTableStructure
-
getQueryableHookManager
SQLQueryableHookManager getQueryableHookManager()- Specified by:
getQueryableHookManagerin interfaceSQLQueryable<T extends DatabaseEntry>
-
setQueryableHookManager
-
insert
- Throws:
DBException
-
insertAndReload
- Throws:
DBException
-
load
- Throws:
DBException
-
loadByUnique
Returns a list of all the possible entries matching with the unique values of the input.- Throws:
DBException
-
loadUnique
Loads the only unique result, or throws an exception if none is found.- Throws:
DBException
-
loadUniqueIfExists
Loads the only unique result, returns null if none is found and throws an exception if too many are available.- Throws:
DBException
-
loadIfExists
- Throws:
DBException
-
loadUniqueIfExistsElseInsert
Loads the first unique result, returns a the newly inserted instance if none is found and throws an exception if too many are available.- Throws:
DBException
-
loadUniqueIfExistsElseInsertAndReload
Loads the first unique result, returns null if none is found and throws an exception if too many are available.- Throws:
DBException
-
truncate
- Throws:
DBException
-
update
- Throws:
DBException
-
updateAndReload
- Throws:
DBException
-
updateAndReloadIfExists
-
updateAndReloadIfExistsElseInsert
-
updateAndReloadIfExistsElseInsertAndReload
-
updateIfExists
-
updateIfExistsElseInsert
-
updateIfExistsElseInsertAndReload
-
insertAll
- Throws:
DBException
-
insertAndReloadAll
- Throws:
DBException
-
deleteAll
- Throws:
DBException
-
updateAll
- Throws:
DBException
-
updateAndReloadAll
- Throws:
DBException
-
loadAll
- Throws:
DBException
-
loadAllUnique
- Throws:
DBException
-
loadAllByUnique
<C extends Collection<T>,D extends Collection<T>> D loadAllByUnique(C datas, Supplier<D> supplier) throws DBException - Throws:
DBException
-
loadAllIfExists
<C extends Collection<T>,D extends Collection<T>> D loadAllIfExists(C datas, Supplier<D> supplier) throws DBException - Throws:
DBException
-
deleteAllIfExists
<C extends Collection<T>,D extends Collection<T>> D deleteAllIfExists(C datas, Supplier<D> supplier) throws DBException - Throws:
DBException
-
filterExists
<C extends Collection<T>,D extends Collection<T>> D filterExists(C datas, Supplier<D> supplier) throws DBException - Throws:
DBException
-
filterExistsUnique
<C extends Collection<T>,D extends Collection<T>> D filterExistsUnique(C datas, Supplier<D> supplier) throws DBException - Throws:
TooManyMatchingRowsException- if a row matches> 0unique rowsDBException
-
filterExistsByUnique
<C extends Collection<T>,D extends Collection<T>> D filterExistsByUnique(C datas, Supplier<D> supplier) throws DBException - Throws:
DBException
-