Enum Class UserEnum

java.lang.Object
java.lang.Enum<UserEnum>
com.easydesk.enums.UserEnum
All Implemented Interfaces:
Entitiable<Long,EasyDeskUser>, Serializable, Comparable<UserEnum>, Constable

public enum UserEnum extends Enum<UserEnum> implements Entitiable<Long,EasyDeskUser>
System 에서 기본으로 사용하는 User 를 id 로 정의한 enum.
Version:
$Id$
Author:
Youngho Cho
  • Enum Constant Details

    • ANONYMOUS

      public static final UserEnum ANONYMOUS
      system anonymous user
    • EASYDESK

      public static final UserEnum EASYDESK
      system owner
    • HELPDESK

      public static final UserEnum HELPDESK
      통지(notification) 등을 처리하는 system 사용자
    • TESTER

      public static final UserEnum TESTER
      테스트 용도의 사용자
    • ADMIN

      public static final UserEnum ADMIN
      system 관리자
    • ERROR_USER

      public static final UserEnum ERROR_USER
      Notification 발송시 Error 처리를 위해 도입했다.
  • Method Details

    • values

      public static UserEnum[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UserEnum valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      public Long getId()
      database userId 를 구한다.
      Specified by:
      getId in interface Entitiable<Long,EasyDeskUser>
      Returns:
      database userId
    • getInstance

      public EasyDeskUser getInstance()
      id 에 해당하는 EasyDeskUser 를 구한다.
      Specified by:
      getInstance in interface Entitiable<Long,EasyDeskUser>
      Returns:
      enum 에 해당하는 EasyDeskUser
      Throws:
      RuntimeException - 사용자를 찾을 수 없는 경우 (database 설정 확인 필요)