de.esprit.netsuite.server.auth.user

## Class UserId

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.server.auth.user.UserId

- All Implemented Interfaces:
    PersistentName, Renderable, DeepCloneable, Dumpable, EspritPermissionOwner, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

      public final class UserId
      extends TransferableObject
      implements java.lang.Comparable, EspritPermissionOwner

  This class keeps the login information of a user who is currently logged in
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserId(int uid, java.lang.String userName, boolean isAdmin, boolean isLocked)`
    `UserId(java.lang.String userId, java.lang.String userName, boolean isAdmin, boolean isLocked)`
    `UserId(User user)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object o)`
    `boolean` | `equals(java.lang.Object obj)` Compares users by uidKey
    `java.lang.String` | `getPersistentName()` Returns the String value to be stored in the database or file.
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `int` | `getUID()`
    `java.lang.String` | `getUserName()`
    `int` | `hashCode()`
    `boolean` | `isAdmin()`
    `boolean` | `isLocked()`
    `static java.awt.Color` | `renderColor(boolean isLocked)`
    `static javax.swing.Icon` | `renderIcon(boolean isLocked, boolean isAdmin)`
    `static java.lang.String` | `renderText(java.lang.String text)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### UserId

          public UserId(User user)

    - #### UserId

          public UserId(java.lang.String userId,
                java.lang.String userName,
                boolean isAdmin,
                boolean isLocked)

    - #### UserId

          public UserId(int uid,
                java.lang.String userName,
                boolean isAdmin,
                boolean isLocked)

  - ### Method Detail

    - #### getUID

          public int getUID()

    - #### getUserName

          public java.lang.String getUserName()

    - #### getPersistentName

          public java.lang.String getPersistentName()

      Description copied from interface: `PersistentName`
      Returns the String value to be stored in the database or file. Note that the implementing Enum must also have a static method named fromPersistentName(String). This ensures that the Enum can be instantiated from the String read from database or file.
      Specified by:
        `getPersistentName` in interface `PersistentName`

    - #### isAdmin

          public boolean isAdmin()

    - #### isLocked

          public boolean isLocked()

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Compares users by uidKey
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### renderText

          public static java.lang.String renderText(java.lang.String text)

    - #### renderColor

          public static java.awt.Color renderColor(boolean isLocked)

    - #### renderIcon

          public static javax.swing.Icon renderIcon(boolean isLocked,
                                    boolean isAdmin)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.