Package org.openwms.common.account.impl
Class AccountServiceImpl
java.lang.Object
org.openwms.common.account.impl.AccountServiceImpl
- All Implemented Interfaces:
AccountService
A AccountServiceImpl.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AccountRepository
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionAccountServiceImpl
(AccountRepository repository, org.ameba.i18n.Translator translator) -
Method Summary
Modifier and TypeMethodDescriptionfindAll()
Find and return a list of all existingAccount
s.findByIdentifier
(@NotBlank String identifier) Find and return theAccount
.findByName
(@NotBlank String name) Find and return theAccount
.@NotNull Account
findByPKey
(@NotBlank String pKey) Find and return a singleAccount
instance identified by its persistent key.
-
Field Details
-
repository
-
translator
private final org.ameba.i18n.Translator translator
-
-
Constructor Details
-
AccountServiceImpl
AccountServiceImpl(AccountRepository repository, org.ameba.i18n.Translator translator)
-
-
Method Details
-
findAll
Find and return a list of all existingAccount
s.- Specified by:
findAll
in interfaceAccountService
- Returns:
- A list, never null
-
findByPKey
@Measured @Transactional(readOnly=true) @NotNull public @NotNull Account findByPKey(@NotBlank @NotBlank String pKey) Find and return a singleAccount
instance identified by its persistent key.- Specified by:
findByPKey
in interfaceAccountService
- Parameters:
pKey
- The persistent key- Returns:
- The Account instance
-
findByIdentifier
@Measured @Transactional(readOnly=true) public Optional<Account> findByIdentifier(@NotBlank @NotBlank String identifier) Find and return theAccount
.- Specified by:
findByIdentifier
in interfaceAccountService
- Parameters:
identifier
- The Account's identifier- Returns:
- The Account instance
-
findByName
@Measured @Transactional(readOnly=true) public Optional<Account> findByName(@NotBlank @NotBlank String name) Find and return theAccount
.- Specified by:
findByName
in interfaceAccountService
- Parameters:
name
- The Account's name- Returns:
- The Account instance
-
findDefault
- Specified by:
findDefault
in interfaceAccountService
- Returns:
-