java.lang.Object
org.litebridge.orm.api.update.impl.AbstractUpdater<DtoUpdateSpec>
org.litebridge.orm.api.dto.update.DtoUpdater<DTO>
- Type Parameters:
DTO- the DTO type
- All Implemented Interfaces:
DtoUpdateStart<DTO>,DtoUpdateStep<DTO>,UpdateQuery,UpdateStep,UpdateTerminal
public final class DtoUpdater<DTO>
extends org.litebridge.orm.api.update.impl.AbstractUpdater<DtoUpdateSpec>
implements DtoUpdateStep<DTO>
Updater for DTOs.
-
Field Summary
Fields inherited from class org.litebridge.orm.api.update.impl.AbstractUpdater
databaseProvider, litebridgeContext, updateSpec -
Constructor Summary
ConstructorsConstructorDescriptionDtoUpdater(Class<DTO> dtoClass, OrmTable dtoTable, TransactionalDatabaseProvider databaseProvider, SelectExpressionMapper selectExpressionMapper, LitebridgeContext litebridgeContext) Creates a new DtoUpdater. -
Method Summary
Modifier and TypeMethodDescriptionSets a field by name.set(ColumnExpressionSpec field) Sets a field by expression.set(QueryField field) Sets a field by metamodel field.Adds a where condition by field name.where(ExpressionSpec expression) Adds a where condition by expression.Methods inherited from class org.litebridge.orm.api.update.impl.AbstractUpdater
execute, execute, updateSpec
-
Constructor Details
-
DtoUpdater
public DtoUpdater(Class<DTO> dtoClass, OrmTable dtoTable, TransactionalDatabaseProvider databaseProvider, SelectExpressionMapper selectExpressionMapper, LitebridgeContext litebridgeContext) Creates a new DtoUpdater.- Parameters:
dtoClass- the DTO classdtoTable- the DTO tabledatabaseProvider- the database providerselectExpressionMapper- the select expression mapperlitebridgeContext- the litebridge context
-
-
Method Details
-
where
Description copied from interface:DtoUpdateStepAdds a where condition by field name.- Specified by:
wherein interfaceDtoUpdateStep<DTO>- Parameters:
field- the field name- Returns:
- the where condition clause
-
where
Description copied from interface:DtoUpdateStepAdds a where condition by expression.- Specified by:
wherein interfaceDtoUpdateStep<DTO>- Parameters:
expression- the expression- Returns:
- the where condition clause
-
set
Description copied from interface:DtoUpdateStartSets a field by name.- Specified by:
setin interfaceDtoUpdateStart<DTO>- Parameters:
field- the field name- Returns:
- the update set step
-
set
Description copied from interface:DtoUpdateStartSets a field by expression.- Specified by:
setin interfaceDtoUpdateStart<DTO>- Parameters:
field- the column expression- Returns:
- the update set step
-
set
Description copied from interface:DtoUpdateStartSets a field by metamodel field.- Specified by:
setin interfaceDtoUpdateStart<DTO>- Parameters:
field- the query field- Returns:
- the update set step
-