public class BreinUser
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BreinUser.UserField
This list may not be complete it just contains some values.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ADDITIONAL_FIELD |
static java.lang.String |
USER_FIELD |
| Constructor and Description |
|---|
BreinUser() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(java.lang.String key) |
<T> T |
get(java.lang.String key,
boolean additional) |
<T> T |
getAdditional(java.lang.String key) |
java.lang.String |
getDateOfBirth()
Returns the date of birth
|
java.lang.String |
getEmail()
get the email of the user
|
java.lang.String |
getFirstName()
Retrieves the first name of the user
|
java.lang.String |
getLastName()
Retrieves the last name of the user
|
java.lang.String |
getSessionId()
returns the sessionId (if set)
|
protected <T> T |
getUserField(BreinUser.UserField field) |
void |
prepareRequestData(BreinConfig config,
java.util.Map<java.lang.String,java.lang.Object> requestData) |
BreinUser |
set(java.lang.String key,
java.lang.Object value)
Sets the users value and overrides any current value.
|
BreinUser |
setAdditional(java.lang.String key,
java.lang.Object value)
Sets an additional value.
|
BreinUser |
setDateOfBirth(int month,
int day,
int year)
Set's the date of birth
There is no check if the month - day combination is valid, only
the range for day, month and year will be checked
|
BreinUser |
setDateOfBirth(java.lang.String dateOfBirthString)
Sets the value of dateOfBirth as String.
|
BreinUser |
setEmail(java.lang.String email)
sets the email of the user
|
BreinUser |
setFirstName(java.lang.String firstName)
set the first name of the user
|
BreinUser |
setLastName(java.lang.String lastName)
set the last name of the user
|
BreinUser |
setSessionId(java.lang.String sessionId)
sets the sessionId
|
java.lang.String |
toString()
provides a nicer output of the user details
|
public static final java.lang.String USER_FIELD
public static final java.lang.String ADDITIONAL_FIELD
public java.lang.String getEmail()
public BreinUser setEmail(java.lang.String email)
email - to set (will not be checked)public java.lang.String getFirstName()
public BreinUser setFirstName(java.lang.String firstName)
firstName - name to setpublic java.lang.String getLastName()
public BreinUser setLastName(java.lang.String lastName)
lastName - last namepublic java.lang.String getSessionId()
public BreinUser setSessionId(java.lang.String sessionId)
sessionId - value of the sessionIdpublic java.lang.String getDateOfBirth()
public BreinUser setDateOfBirth(int month, int day, int year)
month - (1..12)day - (1..31)year - (1900..2100)public BreinUser setDateOfBirth(java.lang.String dateOfBirthString)
dateOfBirthString - contains the date of birth stringpublic BreinUser set(java.lang.String key, java.lang.Object value)
additional field.key - the name of the value to be setvalue - the value to be setpublic <T> T get(java.lang.String key)
public <T> T get(java.lang.String key,
boolean additional)
public <T> T getAdditional(java.lang.String key)
public BreinUser setAdditional(java.lang.String key, java.lang.Object value)
key - the name of the additional value to be setvalue - the value to be setpublic void prepareRequestData(BreinConfig config, java.util.Map<java.lang.String,java.lang.Object> requestData)
public java.lang.String toString()
toString in class java.lang.Objectprotected <T> T getUserField(BreinUser.UserField field)
Copyright © Breinify - All Rights Reserved.