Package lu.kbra.pclib.db.view
Class DatabaseView<T extends DatabaseEntry>
java.lang.Object
lu.kbra.pclib.db.view.DatabaseView<T>
- All Implemented Interfaces:
SQLQueryable<T>,AbstractDBView<T>
- Direct Known Subclasses:
DeferredDatabaseView
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Databaseprotected DatabaseEntryUtilsprotected SQLQueryableHookManagerprotected ViewStructure -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDatabaseView(Database database) DatabaseView(Database database, String name) protectedDatabaseView(Database database, DatabaseEntryUtils dbEntryUtils) protectedDatabaseView(Database database, DatabaseEntryUtils dbEntryUtils, Class<? extends AbstractDBView<T>> viewClass, Map<String, Object> customHints) -
Method Summary
Modifier and TypeMethodDescriptionintcount()protected intcountNotNull(Connection c, T data) intcountNotNull(T data) protected intcountUniques(Connection c, T data) protected intcountUniques(AbstractConnection c, T data) intcountUniques(T data) DatabaseViewStatus<T,? extends DatabaseView<T>> create()protected StringdoubleQuoteEscapeIdentifier(String identifier) drop()booleanexists()protected booleanexists(Connection c, T data) booleanprotected booleanexistsUnique(Connection c, T data) booleanexistsUnique(T data) protected booleanexistsUniques(Connection c, T data) booleanexistsUniques(T data) <C extends Collection<T>,D extends Collection<T>>
DfilterExists(C datas, Supplier<D> supplier) protected <C extends Collection<T>,D extends Collection<T>>
DfilterExists(Connection c, C datas, Supplier<D> supplier) <C extends Collection<T>,D extends Collection<T>>
DfilterExistsUnique(C datas, Supplier<D> supplier) protected <D extends Collection<T>,C extends Collection<T>>
DfilterExistsUnique(AbstractConnection c, C datas, Supplier<D> supplier) String[]final StringgetName()final Stringprotected DatabaseView<T>final Class<? extends SQLQueryable<T>>protected Tload(Connection c, T data) <C extends Collection<T>>
CloadAll(C datas) loadByUnique(T data) <C extends Collection<T>,D extends Collection<T>>
DloadIfExists(C datas, Supplier<D> supplier) protected <C extends Collection<T>,D extends Collection<T>>
DloadIfExists(AbstractConnection c, C datas, Supplier<D> supplier) loadIfExists(T data) loadUnique(T data) loadUniqueIfExists(Connection c, T data) loadUniqueIfExists(T data) protected TloadUniqueInternal(Connection c, T data) <B> BvoidsetDbEntryUtils(DatabaseEntryUtils dbEntryUtils) voidsetViewStructure(ViewStructure viewStructure) protected AbstractConnectionuse()protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface lu.kbra.pclib.db.view.AbstractDBView
getCustomHints, getDatabase, getQueryableHookManager, getStructure, setQueryableHookManagerMethods inherited from interface lu.kbra.pclib.db.impl.SQLQueryable
getDatabaseEntryUtils
-
Field Details
-
database
-
databaseEntryUtils
-
structure
-
customHints
-
queryableHookManager
-
-
Constructor Details
-
DatabaseView
protected DatabaseView() -
DatabaseView
-
DatabaseView
-
DatabaseView
protected DatabaseView(Database database, DatabaseEntryUtils dbEntryUtils, Class<? extends AbstractDBView<T>> viewClass, Map<String, Object> customHints) -
DatabaseView
-
-
Method Details
-
count
- Specified by:
countin interfaceSQLQueryable<T extends DatabaseEntry>- Throws:
DBException
-
countNotNull
- Throws:
DBException
-
countNotNull
- Specified by:
countNotNullin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
countUniques
-
countUniques
- Throws:
DBException
-
countUniques
- Specified by:
countUniquesin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
create
- Specified by:
createin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
doubleQuoteEscapeIdentifier
-
drop
- Specified by:
dropin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
exists
- Specified by:
existsin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
exists
- Throws:
DBException
-
exists
- Specified by:
existsin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
existsUnique
- Throws:
DBException
-
existsUnique
- Specified by:
existsUniquein interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
existsUniques
- Throws:
DBException
-
existsUniques
- Specified by:
existsUniquesin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
filterExists
public <C extends Collection<T>,D extends Collection<T>> D filterExists(C datas, Supplier<D> supplier) throws DBException - Specified by:
filterExistsin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
filterExists
protected <C extends Collection<T>,D extends Collection<T>> D filterExists(Connection c, C datas, Supplier<D> supplier) -
filterExistsUnique
protected <D extends Collection<T>,C extends Collection<T>> D filterExistsUnique(AbstractConnection c, C datas, Supplier<D> supplier) -
filterExistsUnique
public <C extends Collection<T>,D extends Collection<T>> D filterExistsUnique(C datas, Supplier<D> supplier) throws DBException - Specified by:
filterExistsUniquein interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
getConnector
- Specified by:
getConnectorin interfaceSQLQueryable<T extends DatabaseEntry>
-
getCreateSQL
- Specified by:
getCreateSQLin interfaceAbstractDBView<T extends DatabaseEntry>
-
getEntryClass
- Specified by:
getEntryClassin interfaceSQLQueryable<T extends DatabaseEntry>
-
getName
- Specified by:
getNamein interfaceSQLQueryable<T extends DatabaseEntry>
-
getQualifiedName
- Specified by:
getQualifiedNamein interfaceSQLQueryable<T extends DatabaseEntry>
-
getQueryable
-
getTargetClass
- Specified by:
getTargetClassin interfaceSQLQueryable<T extends DatabaseEntry>
-
load
- Throws:
DBException
-
load
- Specified by:
loadin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
loadAll
- Specified by:
loadAllin interfaceAbstractDBView<T extends DatabaseEntry>
-
loadByUnique
- Specified by:
loadByUniquein interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
loadIfExists
protected <C extends Collection<T>,D extends Collection<T>> D loadIfExists(AbstractConnection c, C datas, Supplier<D> supplier) -
loadIfExists
public <C extends Collection<T>,D extends Collection<T>> D loadIfExists(C datas, Supplier<D> supplier) throws DBException - Specified by:
loadIfExistsin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
loadIfExists
- Specified by:
loadIfExistsin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
loadUnique
- Specified by:
loadUniquein interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
loadUniqueIfExists
- Throws:
DBException
-
loadUniqueIfExists
- Specified by:
loadUniqueIfExistsin interfaceAbstractDBView<T extends DatabaseEntry>- Throws:
DBException
-
loadUniqueInternal
-
query
- Specified by:
queryin interfaceSQLQueryable<T extends DatabaseEntry>- Throws:
DBException
-
setDbEntryUtils
-
setViewStructure
- Specified by:
setViewStructurein interfaceAbstractDBView<T extends DatabaseEntry>
-
use
- Throws:
DBException
-
validateStructure
protected void validateStructure()
-