org.apache.blur.thrift.generated
Class User

java.lang.Object
  extended by org.apache.blur.thrift.generated.User
All Implemented Interfaces:
Serializable, Cloneable, Comparable<User>, TBase<User,User._Fields>

public class User
extends Object
implements TBase<User,User._Fields>, Serializable, Cloneable

The user object is used to pass user context to server side session.

See Also:
Serialized Form

Nested Class Summary
static class User._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 Map<String,String> attributes
          map of user attributes.
static Map<User._Fields,FieldMetaData> metaDataMap
           
 String username
          username.
 
Constructor Summary
User()
           
User(String username, Map<String,String> attributes)
           
User(User other)
          Performs a deep copy on other.
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(User other)
           
 User deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(User that)
           
 User._Fields fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 Map<String,String> getAttributes()
          map of user attributes.
 int getAttributesSize()
           
 Object getFieldValue(User._Fields field)
          Get a field's value by field variable.
 String getUsername()
          username.
 int hashCode()
           
 boolean isSet(User._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetAttributes()
          Returns true if field attributes is set (has been assigned a value) and false otherwise
 boolean isSetUsername()
          Returns true if field username is set (has been assigned a value) and false otherwise
 void putToAttributes(String key, String val)
           
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 User setAttributes(Map<String,String> attributes)
          map of user attributes.
 void setAttributesIsSet(boolean value)
           
 void setFieldValue(User._Fields field, Object value)
          Set a field's value by field variable.
 User setUsername(String username)
          username.
 void setUsernameIsSet(boolean value)
           
 String toString()
           
 void unsetAttributes()
           
 void unsetUsername()
           
 void validate()
           
 void write(TProtocol oprot)
          Writes the objects out to the protocol
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

username

public String username
username.


attributes

public Map<String,String> attributes
map of user attributes.


metaDataMap

public static final Map<User._Fields,FieldMetaData> metaDataMap
Constructor Detail

User

public User()

User

public User(String username,
            Map<String,String> attributes)

User

public User(User other)
Performs a deep copy on other.

Method Detail

deepCopy

public User deepCopy()
Specified by:
deepCopy in interface TBase<User,User._Fields>

clear

public void clear()
Description copied from interface: TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface TBase<User,User._Fields>

getUsername

public String getUsername()
username.


setUsername

public User setUsername(String username)
username.


unsetUsername

public void unsetUsername()

isSetUsername

public boolean isSetUsername()
Returns true if field username is set (has been assigned a value) and false otherwise


setUsernameIsSet

public void setUsernameIsSet(boolean value)

getAttributesSize

public int getAttributesSize()

putToAttributes

public void putToAttributes(String key,
                            String val)

getAttributes

public Map<String,String> getAttributes()
map of user attributes.


setAttributes

public User setAttributes(Map<String,String> attributes)
map of user attributes.


unsetAttributes

public void unsetAttributes()

isSetAttributes

public boolean isSetAttributes()
Returns true if field attributes is set (has been assigned a value) and false otherwise


setAttributesIsSet

public void setAttributesIsSet(boolean value)

setFieldValue

public void setFieldValue(User._Fields field,
                          Object value)
Description copied from interface: TBase
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Specified by:
setFieldValue in interface TBase<User,User._Fields>

getFieldValue

public Object getFieldValue(User._Fields field)
Description copied from interface: TBase
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Specified by:
getFieldValue in interface TBase<User,User._Fields>

isSet

public boolean isSet(User._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise

Specified by:
isSet in interface TBase<User,User._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(User that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(User other)
Specified by:
compareTo in interface Comparable<User>

fieldForId

public User._Fields fieldForId(int fieldId)
Description copied from interface: TBase
Get the F instance that corresponds to fieldId.

Specified by:
fieldForId in interface TBase<User,User._Fields>

read

public void read(TProtocol iprot)
          throws TException
Description copied from interface: TBase
Reads the TObject from the given input protocol.

Specified by:
read in interface TBase<User,User._Fields>
Parameters:
iprot - Input protocol
Throws:
TException

write

public void write(TProtocol oprot)
           throws TException
Description copied from interface: TBase
Writes the objects out to the protocol

Specified by:
write in interface TBase<User,User._Fields>
Parameters:
oprot - Output protocol
Throws:
TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws TException
Throws:
TException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.