Package org.openwms.transactions.impl
Class TransactionServiceImpl
java.lang.Object
org.openwms.transactions.impl.TransactionServiceImpl
- All Implemented Interfaces:
Persistable<Transaction>,TransactionService
A TransactionServiceImpl.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisherprivate final io.micrometer.tracing.Tracerprivate final TransactionRepositoryprivate final org.ameba.i18n.Translator -
Constructor Summary
ConstructorsConstructorDescriptionTransactionServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, io.micrometer.tracing.Tracer tracer, org.ameba.i18n.Translator translator, TransactionRepository transactionRepository) -
Method Summary
Modifier and TypeMethodDescriptionprivate TransactioncreateInternal(Transaction transaction) @NotNull List<Transaction> findAll()Find and return allTransactioninstances.@NotNull TransactionfindByPKeyOrThrow(@NotBlank String pKey) Find and return aTransaction.@NotNull List<Transaction> findByType(@NotBlank String type) Find and return allTransactionentries of the giventype.private TransactionfindInternal(String pKey) voidpersist(@NotNull @Valid List<Transaction> transactions) Persists a list of given instances.@NotNull Transactionpersist(@NotNull @Valid Transaction transaction) Persists the given instance.
-
Field Details
-
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher -
tracer
private final io.micrometer.tracing.Tracer tracer -
translator
private final org.ameba.i18n.Translator translator -
transactionRepository
-
-
Constructor Details
-
TransactionServiceImpl
TransactionServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, io.micrometer.tracing.Tracer tracer, org.ameba.i18n.Translator translator, TransactionRepository transactionRepository)
-
-
Method Details
-
findAll
Find and return allTransactioninstances.- Specified by:
findAllin interfaceTransactionService- Returns:
- All instances, never null
-
findByType
Find and return allTransactionentries of the giventype.- Specified by:
findByTypein interfaceTransactionService- Parameters:
type- The type to search for- Returns:
- All existing entries, never null
-
findByPKeyOrThrow
Find and return aTransaction.- Specified by:
findByPKeyOrThrowin interfaceTransactionService- Parameters:
pKey- The persistent key of the Transaction- Returns:
- The instance
-
findInternal
-
persist
@Measured @Validated(Create.class) @NotNull public @NotNull Transaction persist(@NotNull @Valid @NotNull @Valid Transaction transaction) Persists the given instance.- Specified by:
persistin interfacePersistable<Transaction>- Parameters:
transaction- The instance to persist- Returns:
- The persisted instance
-
createInternal
-
persist
@Measured @Validated(Create.class) public void persist(@NotNull @Valid @NotNull @Valid List<Transaction> transactions) Persists a list of given instances.- Specified by:
persistin interfacePersistable<Transaction>- Parameters:
transactions- The instances to persist
-