@Entity public class Friendship extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Friendship.FriendshipKey |
| Constructor and Description |
|---|
Friendship() |
Friendship(User user_from,
User user_to,
FriendshipState state)
Creates a new instance of
Friendship |
| Modifier and Type | Method and Description |
|---|---|
FriendshipState |
getState()
Returns the state of the friendship.
|
User |
getUser_from()
Returns the user requesting the friendship of the event.
|
User |
getUser_to()
Returns the user receiving the friend request.
|
void |
setState(FriendshipState state)
Sets the state of this friendship.
|
void |
setUser_from(User user_from)
Sets the user_from of this friendship.
|
void |
setUser_to(User user_to)
Sets the user_to of this friendship.
|
public Friendship()
public Friendship(User user_from, User user_to, FriendshipState state)
Friendshipuser_from - the user requesting the friendship. This parameter must be a non null user.user_to - the user receiving the friend request. This parameter must be a non null user.state - the state of the friendship. This parameter is an enumerated of type FriendshipState that must be a non null.NullPointerException - if a null value is passed as the value for any
parameter.IllegalArgumentException - if value provided for any parameter is not valid according to
its description.public User getUser_from()
public void setUser_from(User user_from)
user_from - the user requesting the friendship. This parameter must be a non null user.NullPointerException - if a null value is passed.public User getUser_to()
public void setUser_to(User user_to)
user_to - receiving the friend request. This parameter must be a non null user.NullPointerException - if a null value is passed.public FriendshipState getState()
public void setState(FriendshipState state)
state - the new state of the friendship. This parameter is an enumerated of type FriendshipState that must be a non null.NullPointerException - if a null value is passed.Copyright © 2017. All rights reserved.