Package lu.kbra.pclib.db.table
Interface AbstractDBTable<T extends DataBaseEntry>
- All Superinterfaces:
SQLHookable,SQLQueryable<T>
- All Known Implementing Classes:
DataBaseTable,DBTableProxy,DeferredDataBaseTable
-
Method Summary
Modifier and TypeMethodDescriptionintclear()intcountNotNull(T data) intcountUniques(T data) DataBaseTableStatus<T,? extends AbstractDBTable<T>> create()deleteIfExists(T data) deleteUnique(T data) deleteUniques(T data) drop()booleanexists()booleanbooleanexistsUnique(T data) booleanexistsUniques(T data) String[]String[]Class<? extends AbstractDBTable<T>>insertAndReload(T data) loadByUnique(T data) Returns a list of all the possible entries matching with the unique values of the input.loadUnique(T data) Loads the first unique result, or throws an exception if none is found.loadUniqueIfExists(T data) Loads the first 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.inttruncate()updateAndReload(T data) Methods inherited from interface lu.kbra.pclib.db.impl.SQLHookable
requestHookMethods inherited from interface lu.kbra.pclib.db.impl.SQLQueryable
count, getConnector, getDataBaseEntryUtils, getName, getQualifiedName, 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() -
getDatabase
DataBase getDatabase()- Specified by:
getDatabasein interfaceSQLQueryable<T extends DataBaseEntry>
-
getEntryClass
- Specified by:
getEntryClassin interfaceSQLQueryable<T extends DataBaseEntry>
-
getPrimaryKeysNames
String[] getPrimaryKeysNames() -
getTableStructure
TableStructure getTableStructure() -
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 first unique result, or throws an exception if none is found.- Throws:
DBException
-
loadUniqueIfExists
Loads the first unique result, returns null if none is found and throws an exception if too many are available.- 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
-
truncate
- Throws:
DBException
-
update
- Throws:
DBException
-
updateAndReload
- Throws:
DBException
-
getTableClass
Class<? extends AbstractDBTable<T>> getTableClass()
-