java.lang.Object
org.litebridge.orm.engine.SelectEngine
Initiates the fluent API for creating
SELECT statements.-
Constructor Summary
ConstructorsConstructorDescriptionSelectEngine(DtoConstructor dtoConstructor) Creates a newSelectEngineinstance. -
Method Summary
Modifier and TypeMethodDescription<DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass, Class<?> contextDtoClass, LitebridgeContext litebridgeContext) Starts a SELECT query for the specified DTO class within a contextual DTO mapping.<DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass, LitebridgeContext litebridgeContext) Starts a SELECT query for the specified DTO class.select(String[] fieldsOrColumns, Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query selecting the specified fields or columns.select(Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query selecting all fields/columns.select(ExpressionSpec[] expressions, Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query selecting the specified expressions.<T> FromClauseStartTypeOverride<T> select(TypeOverride<T> expression, Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query with a return type override expression.
-
Constructor Details
-
SelectEngine
Creates a newSelectEngineinstance.- Parameters:
dtoConstructor- the DTO constructor instance used for building result objects
-
-
Method Details
-
select
public <DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass, LitebridgeContext litebridgeContext) Starts a SELECT query for the specified DTO class.- Type Parameters:
DTO- the DTO type- Parameters:
dtoClass- the DTO class to querylitebridgeContext- the Litebridge context- Returns:
- the terminal FROM clause step
-
select
public <DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass, Class<?> contextDtoClass, LitebridgeContext litebridgeContext) Starts a SELECT query for the specified DTO class within a contextual DTO mapping.- Type Parameters:
DTO- the DTO type- Parameters:
dtoClass- the DTO class to querycontextDtoClass- the context DTO classlitebridgeContext- the Litebridge context- Returns:
- the terminal FROM clause step
-
select
public FromClauseStart<Row> select(String[] fieldsOrColumns, Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query selecting the specified fields or columns.- Parameters:
fieldsOrColumns- the field or column names to selectlitebridgeContextCreator- the factory function for creating the Litebridge context- Returns:
- the initial FROM clause step
-
select
public FromClauseStart<Row> select(ExpressionSpec[] expressions, Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query selecting the specified expressions.- Parameters:
expressions- the query expressions to selectlitebridgeContextCreator- the factory function for creating the Litebridge context- Returns:
- the initial FROM clause step
-
select
public <T> FromClauseStartTypeOverride<T> select(TypeOverride<T> expression, Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query with a return type override expression.- Type Parameters:
T- the overridden return type- Parameters:
expression- the type override expressionlitebridgeContextCreator- the factory function for creating the Litebridge context- Returns:
- the initial FROM clause step with type override
-
select
public FromClauseStart<Row> select(Function<LitebridgeContext.Mode, LitebridgeContext> litebridgeContextCreator) Starts a SELECT query selecting all fields/columns.- Parameters:
litebridgeContextCreator- the factory function for creating the Litebridge context- Returns:
- the initial FROM clause step
-