接口 JSqlClient
- 所有超级接口:
SubQueryProvider
- 所有已知子接口:
JSqlClientImplementor
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明caches(Consumer<CacheDisableConfig> block) <SE,ST extends Table<SE>, TE, TT extends Table<TE>>
MutableRootQuery<AssociationTable<SE,ST, TE, TT>> createAssociationQuery(AssociationTable<SE, ST, TE, TT> table) createDelete(TableProxy<?> table) <T extends TableProxy<?>>
MutableRootQuery<T>createQuery(T table) createUpdate(TableProxy<?> table) default DeleteResultdeleteById(@NotNull Class<?> type, @NotNull Object id, @NotNull DeleteMode mode) default DeleteResultdeleteById(Class<?> type, Object id) default DeleteResultdeleteByIds(Class<?> type, Iterable<?> ids) default DeleteResultdeleteByIds(Class<?> type, Iterable<?> ids, DeleteMode mode) filters(Consumer<FilterConfig> block) default <T> Tdefault <E> Edefault <T> @NotNull List<T>default <E> @NotNull List<E>default <K,T> @NotNull Map<K, T> findMapByIds(Class<T> type, Iterable<K> ids) default <K,V> @NotNull Map<K, V> findMapByIds(Fetcher<V> fetcher, Iterable<K> ids) default <T> TfindOneById(Class<T> type, Object id) default <E> EfindOneById(Fetcher<E> fetcher, Object id) getAssociations(org.babyfish.jimmer.meta.ImmutableProp immutableProp) getAssociations(org.babyfish.jimmer.meta.TypedProp.Association<?, ?> prop) getAssociations(AssociationType associationType) This method is equivalent to `getTriggers(false)`getTriggers(boolean transaction) If trigger type is 'BINLOG_ONLY' If `transaction` is true, throws exception If `transaction` is false, return binlog trigger If trigger type is 'TRANSACTION_ONLY', returns transaction trigger no matter what the `transaction` is If trigger type is 'BOTH' If `transaction` is true, return transaction trigger If `transaction` is false, return binlog trigger Note that the objects returned by different parameters are independent of each other.default <E> SimpleSaveResult<E>insert(E entity) Insert an entity objectdefault <E> SimpleSaveResult<E>insert(E entity, @NotNull AssociatedSaveMode associatedMode) Insert an entity objectdefault <E> SimpleSaveResult<E>insert(@NotNull org.babyfish.jimmer.Input<E> input) Insert an input DTOdefault <E> SimpleSaveResult<E>insert(@NotNull org.babyfish.jimmer.Input<E> input, @NotNull AssociatedSaveMode associatedMode) Insert an input DTOdefault <E> SimpleSaveResult<E>insertIfAbsent(E entity) Insert an entity object if necessary, if the entity object exists in database, ignore it.default <E> SimpleSaveResult<E>insertIfAbsent(E entity, @NotNull AssociatedSaveMode associatedMode) Insert an entity object if necessary, if the entity object exists in database, ignore it.default <E> SimpleSaveResult<E>insertIfAbsent(@NotNull org.babyfish.jimmer.Input<E> input) Insert an input DTO if necessary, that means to convert the input DTO to entity object and save it.default <E> SimpleSaveResult<E>insertIfAbsent(@NotNull org.babyfish.jimmer.Input<E> input, @NotNull AssociatedSaveMode associatedMode) Insert an input DTO if necessary, that means to convert the input DTO to entity object and save it.default <E> SimpleSaveResult<E>merge(E entity) Merge an entity objectdefault <E> SimpleSaveResult<E>merge(E entity, @NotNull AssociatedSaveMode associatedMode) Merge an entity objectdefault <E> SimpleSaveResult<E>merge(@NotNull org.babyfish.jimmer.Input<E> input) Merge an input DTOdefault <E> SimpleSaveResult<E>merge(@NotNull org.babyfish.jimmer.Input<E> input, @NotNull AssociatedSaveMode associatedMode) Merge an input DTOstatic JSqlClient.Builderdefault <E> SimpleSaveResult<E>save(E entity) Save an entity objectdefault <E> SimpleSaveResult<E>save(E entity, AssociatedSaveMode associatedMode) Save an entity objectdefault <E> SimpleSaveResult<E>Save an entity objectdefault <E> SimpleSaveResult<E>save(E entity, SaveMode mode, @NotNull AssociatedSaveMode associatedMode) Save an entity objectdefault <E> SimpleSaveResult<E>save(org.babyfish.jimmer.Input<E> input) Save an input DTOdefault <E> SimpleSaveResult<E>save(org.babyfish.jimmer.Input<E> input, AssociatedSaveMode associatedMode) Save an input DTOdefault <E> SimpleSaveResult<E>Save an input DTOdefault <E> SimpleSaveResult<E>save(org.babyfish.jimmer.Input<E> input, SaveMode mode, AssociatedSaveMode associatedMode) Save an input DTOdefault <E> BatchSaveResult<E>saveEntities(@NotNull Iterable<E> entities) Save some entities objectsdefault <E> BatchSaveResult<E>saveEntities(@NotNull Iterable<E> entities, @NotNull AssociatedSaveMode associatedMode) Save some entities objectsdefault <E> BatchSaveResult<E>saveEntities(@NotNull Iterable<E> entities, @NotNull SaveMode mode) Save some entities objectsdefault <E> BatchSaveResult<E>saveEntities(@NotNull Iterable<E> entities, @NotNull SaveMode mode, @NotNull AssociatedSaveMode associatedMode) Save some entities objectsdefault <E> BatchSaveResult<E>saveInputs(@NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs) Save some input DTOsdefault <E> BatchSaveResult<E>saveInputs(@NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs, @NotNull SaveMode mode) Save some input DTOsdefault <E> BatchSaveResult<E>saveInputs(@NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs, @NotNull SaveMode mode, @NotNull AssociatedSaveMode associatedMode) Save some input DTOsdefault <E> BatchSaveResult<E>saveInputs(@NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs, AssociatedSaveMode associatedMode) Save some input DTOsdefault <E> SimpleSaveResult<E>update(E entity) Update an entity objectdefault <E> SimpleSaveResult<E>update(E entity, @NotNull AssociatedSaveMode associatedMode) Update an entity objectdefault <E> SimpleSaveResult<E>update(@NotNull org.babyfish.jimmer.Input<E> input) Update an input DTOdefault <E> SimpleSaveResult<E>update(@NotNull org.babyfish.jimmer.Input<E> input, @NotNull AssociatedSaveMode associatedMode) Update an input DTO从接口继承的方法 org.babyfish.jimmer.sql.ast.query.SubQueryProvider
createAssociationSubQuery, createSubQuery
-
方法详细资料
-
newBuilder
-
createQuery
-
createUpdate
-
createDelete
-
createAssociationQuery
<SE,ST extends Table<SE>, MutableRootQuery<AssociationTable<SE,TE, TT extends Table<TE>> ST, createAssociationQueryTE, TT>> (AssociationTable<SE, ST, TE, TT> table) -
getEntities
Entities getEntities() -
getTriggers
Triggers getTriggers()This method is equivalent to `getTriggers(false)`- 返回:
-
getTriggers
-
If trigger type is 'BINLOG_ONLY'
- If `transaction` is true, throws exception
- If `transaction` is false, return binlog trigger
- If trigger type is 'TRANSACTION_ONLY', returns transaction trigger no matter what the `transaction` is
-
If trigger type is 'BOTH'
- If `transaction` is true, return transaction trigger
- If `transaction` is false, return binlog trigger
- 参数:
transaction-- 返回:
- Trigger
-
If trigger type is 'BINLOG_ONLY'
-
getAssociations
-
getAssociations
-
getAssociations
-
getCaches
Caches getCaches() -
getFilters
Filters getFilters() -
getBinLog
BinLog getBinLog() -
caches
-
filters
-
disableSlaveConnectionManager
-
executor
-
findById
- 类型参数:
T- Entity type or output DTO type
-
findById
-
findOneById
- 类型参数:
T- Entity type or output DTO type
-
findOneById
-
findByIds
- 类型参数:
T- Entity type or output DTO type
-
findByIds
-
findMapByIds
- 类型参数:
T- Entity type or output DTO type
-
findMapByIds
-
save
default <E> SimpleSaveResult<E> save(E entity, SaveMode mode, @NotNull @NotNull AssociatedSaveMode associatedMode) Save an entity object- 类型参数:
E- The type of saved entity- 参数:
entity- The saved entity object.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
mode- The save mode of aggregate-rootassociatedMode- The save mode of associated-objects- 返回:
- The saved result for single object
-
save
Save an entity object- 类型参数:
E- The type of saved entity- 参数:
entity- The saved entity object.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
mode- The save mode of aggregate-rootThe associated save mode of associated objects is
AssociatedSaveMode.REPLACE- 返回:
- The saved result for single object
-
save
Save an entity object- 类型参数:
E- The type of saved entity- 参数:
entity- The saved entity object.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
associatedMode- The save mode of associated-objectsThe save mode of aggregate-root is
SaveMode.UPSERT- 返回:
- The saved result for single object
-
save
Save an entity object- 类型参数:
E- The type of saved entity- 参数:
entity- The saved entity object.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.UPSERTThe associated save mode of associated objects is
AssociatedSaveMode.REPLACE- 返回:
- The saved result for single object
-
save
default <E> SimpleSaveResult<E> save(org.babyfish.jimmer.Input<E> input, SaveMode mode, AssociatedSaveMode associatedMode) Save an input DTO- 类型参数:
E- The type of saved entity- 参数:
input- The saved input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
mode- The save mode of aggregate-rootassociatedMode- The save mode of associated-objects- 返回:
- The saved result for single object
-
save
Save an input DTO- 类型参数:
E- The type of saved entity- 参数:
input- The saved input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
mode- The save mode of aggregate-rootThe associated save mode of associated objects is
AssociatedSaveMode.REPLACE- 返回:
- The saved result for single object
-
save
default <E> SimpleSaveResult<E> save(org.babyfish.jimmer.Input<E> input, AssociatedSaveMode associatedMode) Save an input DTO- 类型参数:
E- The type of saved entity- 参数:
input- The saved input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
associatedMode- The save mode of associated-objectsThe save mode of aggregate-root is
SaveMode.UPSERT- 返回:
- The saved result for single object
-
save
Save an input DTO- 类型参数:
E- The type of saved entity- 参数:
input- The saved input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.UPSERTThe associated save mode of associated objects is
AssociatedSaveMode.REPLACE- 返回:
- The saved result for single object
-
insert
Insert an entity object- 类型参数:
E- The type of inserted entity- 参数:
entity- The inserted entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.INSERT_ONLY - The associated save mode of associated objects is
AssociatedSaveMode.APPEND
- The save mode of aggregate-root is
- 返回:
- The save result for single object
-
insert
default <E> SimpleSaveResult<E> insert(@NotNull E entity, @NotNull @NotNull AssociatedSaveMode associatedMode) Insert an entity object- 类型参数:
E- The type of inserted entity- 参数:
entity- The inserted entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.INSERT_ONLYassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
-
insertIfAbsent
Insert an entity object if necessary, if the entity object exists in database, ignore it.- If the value of id property decorated by
Idis specified, use id value to check whether the entity object exists in database - otherwise, if the values of key properties decorated by
Keyis specified use key values to check whether the entity object exists in database - If neither value of id property nor values of key properties is specified, exception will be raised.
- 类型参数:
E- The type of inserted entity- 参数:
entity- The inserted entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.INSERT_IF_ABSENT - The associated save mode of associated objects
AssociatedSaveMode.APPEND_IF_ABSENT
- The save mode of aggregate-root is
- 返回:
- The save result for single object
- If the value of id property decorated by
-
insertIfAbsent
default <E> SimpleSaveResult<E> insertIfAbsent(@NotNull E entity, @NotNull @NotNull AssociatedSaveMode associatedMode) Insert an entity object if necessary, if the entity object exists in database, ignore it.- If the value of id property decorated by
Idis specified, use id value to check whether the entity object exists in database - otherwise, if the values of key properties decorated by
Keyis specified use key values to check whether the entity object exists in database - If neither value of id property nor values of key properties is specified, exception will be raised.
- 类型参数:
E- The type of inserted entity- 参数:
entity- The inserted entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.INSERT_IF_ABSENTassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
- If the value of id property decorated by
-
update
Update an entity object- 类型参数:
E- The type of inserted entity- 参数:
entity- The updated entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.UPDATE_ONLY - The associated save mode of associated objects is
AssociatedSaveMode.UPDATE
- The save mode of aggregate-root is
- 返回:
- The save result for single object
-
update
default <E> SimpleSaveResult<E> update(@NotNull E entity, @NotNull @NotNull AssociatedSaveMode associatedMode) Update an entity object- 类型参数:
E- The type of inserted entity- 参数:
entity- The updated entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.UPDATE_ONLYassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
-
merge
Merge an entity object- 类型参数:
E- The type of inserted entity- 参数:
entity- The merged entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.UPSERT - The associated save mode of associated objects is
AssociatedSaveMode.MERGE
- The save mode of aggregate-root is
- 返回:
- The save result for single object
-
merge
default <E> SimpleSaveResult<E> merge(@NotNull E entity, @NotNull @NotNull AssociatedSaveMode associatedMode) Merge an entity object- 类型参数:
E- The type of inserted entity- 参数:
entity- The merged entity objectNote: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.UPSERTassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
-
insert
Insert an input DTO- 类型参数:
E- The type of inserted entity- 参数:
input- The inserted input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.INSERT_ONLY - The associated save mode of associated objects is
AssociatedSaveMode.APPEND
- The save mode of aggregate-root is
- 返回:
- The save result for single object
-
insert
default <E> SimpleSaveResult<E> insert(@NotNull @NotNull org.babyfish.jimmer.Input<E> input, @NotNull @NotNull AssociatedSaveMode associatedMode) Insert an input DTO- 类型参数:
E- The type of inserted entity- 参数:
input- The inserted input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.INSERT_ONLYassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
-
insertIfAbsent
default <E> SimpleSaveResult<E> insertIfAbsent(@NotNull @NotNull org.babyfish.jimmer.Input<E> input) Insert an input DTO if necessary, that means to convert the input DTO to entity object and save it. If the entity object exists in database, ignore it.- If the value of id property decorated by
Idis specified, use id value to check whether the entity object exists in database - otherwise, if the values of key properties decorated by
Keyis specified use key values to check whether the entity object exists in database - If neither value of id property nor values of key properties is specified, exception will be raised.
- 类型参数:
E- The type of inserted entity- 参数:
input- The inserted input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.INSERT_IF_ABSENT - The associated save mode of associated objects is
AssociatedSaveMode.APPEND_IF_ABSENT
- The save mode of aggregate-root is
- 返回:
- The save result for single object
- If the value of id property decorated by
-
insertIfAbsent
default <E> SimpleSaveResult<E> insertIfAbsent(@NotNull @NotNull org.babyfish.jimmer.Input<E> input, @NotNull @NotNull AssociatedSaveMode associatedMode) Insert an input DTO if necessary, that means to convert the input DTO to entity object and save it. If the entity object exists in database, ignore it.- If the value of id property decorated by
Idis specified, use id value to check whether the entity object exists in database - otherwise, if the values of key properties decorated by
Keyis specified use key values to check whether the entity object exists in database - If neither value of id property nor values of key properties is specified, exception will be raised.
- 类型参数:
E- The type of inserted entity- 参数:
input- The inserted input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.INSERT_IF_ABSENTassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
- If the value of id property decorated by
-
update
Update an input DTO- 类型参数:
E- The type of inserted entity- 参数:
input- The updated input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.UPDATE_ONLY - The associated save mode of associated objects is
AssociatedSaveMode.UPDATE
- The save mode of aggregate-root is
- 返回:
- The save result for single object
-
update
default <E> SimpleSaveResult<E> update(@NotNull @NotNull org.babyfish.jimmer.Input<E> input, @NotNull @NotNull AssociatedSaveMode associatedMode) Update an input DTO- 类型参数:
E- The type of inserted entity- 参数:
input- The updated input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.UPDATE_ONLYassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
-
merge
Merge an input DTO- 类型参数:
E- The type of inserted entity- 参数:
input- The merged input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-root is
SaveMode.UPSERT - The associated save mode of associated objects is
AssociatedSaveMode.MERGE
- The save mode of aggregate-root is
- 返回:
- The save result for single object
-
merge
default <E> SimpleSaveResult<E> merge(@NotNull @NotNull org.babyfish.jimmer.Input<E> input, @NotNull @NotNull AssociatedSaveMode associatedMode) Merge an input DTO- 类型参数:
E- The type of inserted entity- 参数:
input- The merged input DTOIn terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-root is
SaveMode.UPSERTassociatedMode- The associated save mode of associated objects.- 返回:
- The save result for single object
-
saveEntities
default <E> BatchSaveResult<E> saveEntities(@NotNull @NotNull Iterable<E> entities, @NotNull @NotNull SaveMode mode, @NotNull @NotNull AssociatedSaveMode associatedMode) Save some entities objects- 类型参数:
E- The type of saved entities- 参数:
entities- The saved entity objects.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
mode- The save mode of aggregate-rootsassociatedMode- The save mode of associated-objects- 返回:
- The saved result for multiple objects
-
saveEntities
default <E> BatchSaveResult<E> saveEntities(@NotNull @NotNull Iterable<E> entities, @NotNull @NotNull SaveMode mode) Save some entities objects- 类型参数:
E- The type of saved entities- 参数:
entities- The saved entity objects.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The associated save mode of associated objects is
AssociatedSaveMode.REPLACEmode- The save mode of aggregate-roots- 返回:
- The saved result for multiple objects
-
saveEntities
default <E> BatchSaveResult<E> saveEntities(@NotNull @NotNull Iterable<E> entities, @NotNull @NotNull AssociatedSaveMode associatedMode) Save some entities objects- 类型参数:
E- The type of saved entities- 参数:
entities- The saved entity objects.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-roots is
SaveMode.UPSERTassociatedMode- The save mode of associated-objects- 返回:
- The saved result for multiple objects
-
saveEntities
Save some entities objects- 类型参数:
E- The type of saved entities- 参数:
entities- The saved entity objects.Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-roots is
SaveMode.UPSERT - The associated save mode of aggregated objects is
AssociatedSaveMode.REPLACE
- The save mode of aggregate-roots is
- 返回:
- The saved result for multiple objects
-
saveInputs
default <E> BatchSaveResult<E> saveInputs(@NotNull @NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs, @NotNull @NotNull SaveMode mode, @NotNull @NotNull AssociatedSaveMode associatedMode) Save some input DTOs- 类型参数:
E- The type of saved entities- 参数:
inputs- The saved input DTOs.In terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
mode- The save mode of aggregate-rootsassociatedMode- The save mode of associated-objects- 返回:
- The saved result for multiple objects
-
saveInputs
default <E> BatchSaveResult<E> saveInputs(@NotNull @NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs, @NotNull @NotNull SaveMode mode) Save some input DTOs- 类型参数:
E- The type of saved entities- 参数:
inputs- The saved input DTOs.In terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The associated save mode of associated objects is
AssociatedSaveMode.REPLACEmode- The save mode of aggregate-roots- 返回:
- The saved result for multiple objects
-
saveInputs
default <E> BatchSaveResult<E> saveInputs(@NotNull @NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs, AssociatedSaveMode associatedMode) Save some input DTOs- 类型参数:
E- The type of saved entities- 参数:
inputs- The saved input DTOs.In terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
The save mode of aggregate-roots is
SaveMode.UPSERTassociatedMode- The save mode of associated-objects- 返回:
- The saved result for multiple objects
-
saveInputs
default <E> BatchSaveResult<E> saveInputs(@NotNull @NotNull Iterable<org.babyfish.jimmer.Input<E>> inputs) Save some input DTOs- 类型参数:
E- The type of saved entities- 参数:
inputs- The saved input DTOs.In terms of internal mechanisms, any type of Input DTO is automatically converted into an entity object of the same type.
Note: The jimmer entity is not POJO, it can easily express data structures of arbitrary shape, you can use it to save data structures of arbitrary shape.
Unlike most JVM ORMs, Jimmer does not sepcified the shape of the saved data structure by using configuration such as `insertable`, `updatable` or `cascade`; instead, it uses the dynamic nature of entity object itself to describe the shape of saved data structure, without prior design
Unspecified properties will be ignored, only the specified properties (whether null or not) will be saved. In addition to objects with only id property, any associated objects will result in deeper recursive saves.
- The save mode of aggregate-roots is
SaveMode.UPSERT - The associated save mode of associated objects is
AssociatedSaveMode.REPLACE
- The save mode of aggregate-roots is
- 返回:
- The saved result for multiple objects
-
deleteById
default DeleteResult deleteById(@NotNull @NotNull Class<?> type, @NotNull @NotNull Object id, @NotNull @NotNull DeleteMode mode) -
deleteById
-
deleteByIds
-
deleteByIds
-