# Class: User

## User

#### new User()

  Represents a user.

  Source:
    - app/model/entities/User.js, line 8

### Members

#### <static> ROLE_ADMIN :Number

  Constant. Identification of user's role - administrator.

  ##### Type:

  - Number
  Source:
    - app/model/entities/User.js, line 22

#### <static> ROLE_OP :Number

  Constant. Identification of user's role - operator.

  ##### Type:

  - Number
  Source:
    - app/model/entities/User.js, line 29

### Methods

#### getName() → {String}

  Name getter.

  Source:
    - app/model/entities/User.js, line 41

  ##### Returns:

  Type
    String

#### getPassword() → {String}

  Password getter. Returns hashed password.

  Source:
    - app/model/entities/User.js, line 61

  ##### Returns:

  Type
    String

#### getRole() → {Number}

  Role getter.

  Source:
    - app/model/entities/User.js, line 71

  ##### Returns:

  Type
    Number

#### getUsername() → {String}

  Username getter.

  Source:
    - app/model/entities/User.js, line 51

  ##### Returns:

  Type
    String

#### setId(value) → {User}

  Sets user id.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `value` | Number |

  Source:
    - app/model/entities/User.js, line 83

  ##### Returns:

  Type
    User

#### setName(value) → {User}

  Sets user's real name.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `value` | String |

  Source:
    - app/model/entities/User.js, line 95

  ##### Returns:

  Type
    User

#### setPassword(value) → {User}

  Sets password.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `value` | String |

  Source:
    - app/model/entities/User.js, line 119

  ##### Returns:

  Type
    User

#### setRole(value) → {User}

  Sets user's role.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `value` | Number | Numeric representation of role. User.ROLE_ADMIN or User.ROLE_OP

  Source:
    - app/model/entities/User.js, line 130

  ##### Returns:

  Type
    User

#### setUsername(value) → {User}

  Sets username.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `value` | String |

  Source:
    - app/model/entities/User.js, line 107

  ##### Returns:

  Type
    User