java.lang.Object
org.litebridgedb.orm.api.select.impl.AbstractSelector<TypeOverride,DtoSelectSpec>
org.litebridgedb.orm.api.dto.DtoSelector<TypeOverride>
- All Implemented Interfaces:
SelectTerminal<TypeOverride>
public final class DtoSelector<TypeOverride>
extends org.litebridgedb.orm.api.select.impl.AbstractSelector<TypeOverride,DtoSelectSpec>
-
Field Summary
Fields inherited from class org.litebridgedb.orm.api.select.impl.AbstractSelector
databaseProvider, dtoClass, litebridgeContext, selectSpec -
Constructor Summary
ConstructorsConstructorDescriptionDtoSelector(Class<TypeOverride> typeOverride, OrmTable ormTable, TableRegistry tableRegistry, ClassFieldAccessorCache classFieldAccessorCache, DtoConstructor dtoConstructor, TransactionalDatabaseProvider databaseProvider, AliasGenerator aliasGenerator, LitebridgeContext litebridgeContext) -
Method Summary
Modifier and TypeMethodDescription@Nullable TypeOverrideExecutes the query and returns the first row if present.list()Executes the query and materializes all results into aList.@Nullable TypeOverrideExecutes the query and expects exactly one result.select()select(ExpressionSpec... expressionSpecs) protected DtoSelectSpecMethods inherited from class org.litebridgedb.orm.api.select.impl.AbstractSelector
executeQuery, executeQuery, first, firstOrThrow, firstOrThrow, litebridgeContext, one, oneOrThrow, oneOrThrow, stream, toSql
-
Constructor Details
-
DtoSelector
public DtoSelector(Class<TypeOverride> typeOverride, OrmTable ormTable, TableRegistry tableRegistry, ClassFieldAccessorCache classFieldAccessorCache, DtoConstructor dtoConstructor, TransactionalDatabaseProvider databaseProvider, AliasGenerator aliasGenerator, LitebridgeContext litebridgeContext)
-
-
Method Details
-
select
-
select
-
oneOrNull
Description copied from interface:SelectTerminalExecutes the query and expects exactly one result.- Specified by:
oneOrNullin interfaceSelectTerminal<TypeOverride>- Specified by:
oneOrNullin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<TypeOverride,DtoSelectSpec> - Returns:
- the single result, or
nullwhen no row matches
-
firstOrNull
Description copied from interface:SelectTerminalExecutes the query and returns the first row if present.- Specified by:
firstOrNullin interfaceSelectTerminal<TypeOverride>- Specified by:
firstOrNullin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<TypeOverride,DtoSelectSpec> - Returns:
- the first result, or
nullwhen no row matches
-
list
Description copied from interface:SelectTerminalExecutes the query and materializes all results into aList.- Specified by:
listin interfaceSelectTerminal<TypeOverride>- Specified by:
listin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<TypeOverride,DtoSelectSpec> - Returns:
- list of all matching results (possibly empty)
-
selectSpec
- Overrides:
selectSpecin classorg.litebridgedb.orm.api.select.impl.AbstractSelector<TypeOverride,DtoSelectSpec>
-
classFieldAccessorCache
-