@Entity public class Friendship extends Object implements Serializable
| Constructor and Description |
|---|
Friendship()
Constructs a new instance of
Friendship. |
Friendship(FriendshipState friendshipState,
User user,
User friend) |
| Modifier and Type | Method and Description |
|---|---|
User |
getFriend()
Returns the friend as an
User. |
FriendshipState |
getFriendshipState() |
User |
getUser() |
void |
setFriend(User friend) |
void |
setFriendshipState(FriendshipState state) |
void |
setUser(User user) |
@VisibleForJPA public Friendship()
Friendship. This empty constructor is
required by the JPA framework and should never be used
directly.public Friendship(FriendshipState friendshipState, User user, User friend)
friendshipState - the FriendshipState friendship's stateuser - The sender User friend's requestfriend - The receiver User friend's requestpublic FriendshipState getFriendshipState()
FriendshipStatepublic void setFriendshipState(FriendshipState state) throws NullPointerException
state - FriendshipStateNullPointerException - should not be nullpublic void setFriend(User friend) throws NullPointerException
friend - NullPointerExceptionpublic void setUser(User user) throws NullPointerException
user - the UserNullPointerExceptionCopyright © 2017. All rights reserved.