de.esprit.netsuite.server.auth.dbuser

## Class DatabaseUser

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.appsuite.database.dbase.DBRecordContainer<R>
      - - de.esprit.appsuite.database.dbase.DBRecordWrapper<R>
        - - de.esprit.netsuite.server.auth.dbuser.AbstractDatabaseUser
          - - de.esprit.netsuite.server.auth.dbuser.DatabaseUser

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

      public class DatabaseUser
      extends AbstractDatabaseUser

  This is a sample custom implementation of a database user
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface de.esprit.netsuite.server.auth.user.User

      `changedTsKey, commentKey, createdTsKey, emailKey, foreNameKey, isAdminKey, isLockedKey, languageKey, lastNameKey, passwordKey, uidKey, userNameKey, usersDocType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DatabaseUser()`
    `DatabaseUser(DBO_esprit_user user)`
    `DatabaseUser(User user)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.sql.Timestamp` | `getChangedTimestamp()`
    `java.lang.String` | `getComment()` Returns an optional comment for this user.
    `java.sql.Timestamp` | `getCreatedTimestamp()`
    `java.lang.String` | `getEmailAddress()` Returns the user's email address.
    `java.lang.String` | `getForeName()` Returns the user's forename.
    `Language` | `getLanguage()` Returns a never null `Language` constant.
    `java.lang.String` | `getLastName()` Returns the user's lastname.
    `java.lang.String` | `getPassword()` Returns the users password as stored on server side.
    `DBO_esprit_user` | `getRecord()`
    `int` | `getUID()` Returns a unique ID for this user.
    `UserId` | `getUserId()` Returns the UserId as a shortcut for the user identifying data
    `java.lang.String` | `getUserName()` Returns the user's unique login name.
    `boolean` | `isAdmin()` The user is defined to be the admin user if the userType is 0
    `boolean` | `isLocked()` The user is allowed to log in.
    `void` | `setAdmin(boolean isAdmin)`
    `void` | `setChangedTimestamp(java.sql.Timestamp changedTs)`
    `void` | `setComment(java.lang.String comment)`
    `void` | `setCreatedTimestamp(java.sql.Timestamp createdTs)`
    `void` | `setEmailAddress(java.lang.String email)`
    `void` | `setForeName(java.lang.String foreName)`
    `void` | `setLanguage(Language language)`
    `void` | `setLastName(java.lang.String lastName)`
    `void` | `setLocked(boolean isLocked)`
    `void` | `setPassword(java.lang.String password)`
    `void` | `setUID(int uid)` Note that once set the uidKey will never change.

    - ### Methods inherited from class de.esprit.netsuite.server.auth.dbuser.AbstractDatabaseUser

      `equals, getPersistentName, getRenderColor, getRenderIcon, getRenderText`

    - ### Methods inherited from class de.esprit.appsuite.database.dbase.DBRecordWrapper

      `clone, compareTo, copyRecordValues, dbDelete, dbInsert, dbLoad, dbLoad, dbRehash, dbSearch, dbSearch, dbSearch, dbSearch, dbSelect, dbSelect, dbUpdate, deepClone, exists, existsField, getFieldCount, getFieldFullNames, getFieldIcon, getFieldLength, getFieldNames, getForeignKeyRef, getJavaType, getJdbcType, getManagedDBObjects, getMasterRecord, getPrimaryKeyCount, getPrimaryKeyValues, getRecordName, getTranslationAppKey, getValue, hasPrimaryKey, isDirty, isFieldVirtual, isForeignKey, isNotNullField, isPrimaryKey, setPrimaryKeyValues`

    - ### Methods inherited from class de.esprit.appsuite.database.dbase.DBRecordContainer

      `hashCode, toDumpString, toString`

    - ### 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`

    - ### Methods inherited from interface de.esprit.netsuite.server.auth.user.User

      `clone`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Constructor Detail

    - #### DatabaseUser

          public DatabaseUser(User user)

    - #### DatabaseUser

          public DatabaseUser()

    - #### DatabaseUser

          public DatabaseUser(DBO_esprit_user user)

  - ### Method Detail

    - #### getRecord

          public DBO_esprit_user getRecord()

      Overrides:
        `getRecord` in class `DBRecordContainer`

    - #### getLanguage

          public Language getLanguage()

      Returns a never null `Language` constant. Language.NONE is returned if no language is set.

    - #### setLanguage

          public void setLanguage(Language language)

    - #### getUID

          public int getUID()

      Description copied from interface: `User`
      Returns a unique ID for this user.

    - #### setUID

          public void setUID(int uid)

      Description copied from interface: `User`
      Note that once set the uidKey will never change. It must be settable anyway because it is typically determined by a database system and thus must be adaptable in the User Object.
      See Also:
        `User.getUID()`

    - #### getUserId

          public UserId getUserId()

      Description copied from interface: `User`
      Returns the UserId as a shortcut for the user identifying data

    - #### getUserName

          public java.lang.String getUserName()

      Description copied from interface: `User`
      Returns the user's unique login name. This should be a short name with no white spaces and in lower case letters only.

    - #### getForeName

          public java.lang.String getForeName()

      Description copied from interface: `User`
      Returns the user's forename.

    - #### setForeName

          public void setForeName(java.lang.String foreName)

    - #### getLastName

          public java.lang.String getLastName()

      Description copied from interface: `User`
      Returns the user's lastname.

    - #### setLastName

          public void setLastName(java.lang.String lastName)

    - #### getEmailAddress

          public java.lang.String getEmailAddress()

      Description copied from interface: `User`
      Returns the user's email address.

    - #### setEmailAddress

          public void setEmailAddress(java.lang.String email)

    - #### getPassword

          public java.lang.String getPassword()

      Description copied from interface: `User`
      Returns the users password as stored on server side. Note that in the implementation the password should be transient in order not to be transferred via the network.

    - #### setPassword

          public void setPassword(java.lang.String password)

    - #### setComment

          public void setComment(java.lang.String comment)

    - #### getComment

          public java.lang.String getComment()

      Description copied from interface: `User`
      Returns an optional comment for this user.

    - #### isAdmin

          public boolean isAdmin()

      Description copied from interface: `User`
      The user is defined to be the admin user if the userType is 0

    - #### setAdmin

          public void setAdmin(boolean isAdmin)

    - #### isLocked

          public boolean isLocked()

      Description copied from interface: `User`
      The user is allowed to log in.

    - #### setLocked

          public void setLocked(boolean isLocked)

    - #### getChangedTimestamp

          public java.sql.Timestamp getChangedTimestamp()

    - #### setChangedTimestamp

          public void setChangedTimestamp(java.sql.Timestamp changedTs)

    - #### getCreatedTimestamp

          public java.sql.Timestamp getCreatedTimestamp()

    - #### setCreatedTimestamp

          public void setCreatedTimestamp(java.sql.Timestamp createdTs)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.