Interface UserAccountService

All Known Implementing Classes:
UserAccountServiceImpl

public interface UserAccountService
Author:
Filip Hrisafov
  • Method Details

    • createNewUserAccountBuilder

      UserAccountBuilder createNewUserAccountBuilder()
    • createUpdateUserAccountBuilder

      UserAccountBuilder createUpdateUserAccountBuilder(String accountId)
    • createUserAccountQuery

      UserAccountQuery createUserAccountQuery()
    • findById

      UserAccount findById(String userAccountId)
    • findByIds

      List<UserAccount> findByIds(Collection<String> userAccountIds)
    • setStateAndSubState

      void setStateAndSubState(String accountId, String state, String subState)
      Update the state and sub state of the user account. If the value for the state is null then the state of the user account won't be changed. If the value for the subState is null then the subState of the user account won't be changed. At least one of state and / or subState must be set
      Parameters:
      accountId - the id of the account that should have it's state updated
      state - the optional new state of the account, if null it won't be changed
      subState - the optional new sub state of the account, if null if won't be changed
    • setState

      default void setState(String accountId, String state)
      Set the state of this user account. By default this method delegates to setStateAndSubState(String, String, String) with subState null
      Parameters:
      accountId - the id of the account to change its state
      state - the new state to be set on this user object
      See Also:
    • setSubState

      default void setSubState(String accountId, String subState)
      Set the sub state of this user account. The sub state might be used to more specifically describe the current state of the user account. By default this method delegates to setStateAndSubState(String, String, String) with state null
      Parameters:
      accountId - the id of the account to change its substate
      subState - the new sub state to be set on this user object
      See Also:
    • setType

      void setType(String accountId, String type, String subType)
      Update the type and sub type of the user account
      Parameters:
      accountId - the of the account that should have it's type updated
      type - the new type of the account
      subType - the new sub type of the account
    • deleteUserAccount

      void deleteUserAccount(String accountId)
      Delete the user account with the given id.
      Parameters:
      accountId - the id of the account