@Entity public class Event extends Object
| Constructor and Description |
|---|
Event(EventType eventType,
String title,
String shortDescription,
Date date,
String location)
Creates a new instance of
Event. |
Event(EventType eventType,
String title,
String shortDescription,
Date date,
String location,
User creator)
Creates a new instance of
Event. |
Event(EventType eventType,
String title,
String shortDescription,
Date date,
String location,
User creator,
List<User> eventsJoinedByUsers)
Creates a new instance of
Event. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
User |
getCreator()
The getter for the event creator
|
Date |
getDate()
The getter for the date parameter.
|
List<User> |
getEventsJoinedByUsers()
Return all the users who have joined an event
|
EventType |
getEventType()
The getter for the eventType parameter.
|
int |
getId()
The getter for the id parameter.
|
String |
getLocation()
Extracts the value of the current Event's location.
|
String |
getShortDescription()
The getter for the description parameter.
|
String |
getTitle()
The getter for the title parameter.
|
int |
hashCode() |
void |
setCreator(User creator)
The setter for the event creator
|
void |
setDate(Date date)
The setter for the
Date parameter. |
void |
setEventType(EventType eventType)
The setter for the eventType parameter.
|
void |
setLocation(String location)
Sets the location of the current event to the received String.
|
void |
setShortDescription(String shortDescription)
The setter for the description parameter.
|
void |
setTitle(String title)
The setter for the title parameter.
|
public Event(EventType eventType, String title, String shortDescription, Date date, String location)
Event.eventType - the event type of the event. This paramenter must be a non
null EventType.title - the title of the envent. This paramenter must be a non
null string with with a maximum length of 20.shortDescription - the description of the event. This paramenter must be a non
null string with with a maximum length of 50.date - the date of the event. This paramenter must be a non
null.location - the location of the eventpublic Event(EventType eventType, String title, String shortDescription, Date date, String location, User creator)
Event.eventType - the event type of the event. This paramenter must be a non
null EventType.title - the title of the envent. This paramenter must be a non
null string with with a maximum length of 20.shortDescription - the description of the event. This paramenter must be a non
null string with with a maximum length of 50.date - the date of the event. This paramenter must be a non
null.location - the location of the eventcreator - the creator of the eventpublic Event(EventType eventType, String title, String shortDescription, Date date, String location, User creator, List<User> eventsJoinedByUsers)
Event.eventType - the event type of the event. This paramenter must be a non
null EventType.title - the title of the envent. This paramenter must be a non
null string with with a maximum length of 20.shortDescription - the description of the event. This paramenter must be a non
null string with with a maximum length of 50.date - the date of the event. This paramenter must be a non
null.location - the location of the eventcreator - the creator of the eventeventsJoinedByUsers - Users who was joined to the eventpublic EventType getEventType()
public void setEventType(EventType eventType)
eventType - the event type of the event. This paramenter must be a non
null EventType.NullPointerException - if a null value is passed as the value for this
parameter.public String getTitle()
public void setTitle(String title)
title - the title of the envent. This paramenter must be a non
null string with with a maximum length of 20.NullPointerException - if a null value is passed as the value for this
parameter.IllegalArgumentException - if value provided for the is not valid according to its
description.public String getShortDescription()
public void setShortDescription(String shortDescription)
shortDescription - the description of the event. This paramenter must be a non
null string with with a maximum length of 50.NullPointerException - if a null value is passed as the value for this
parameter.IllegalArgumentException - if value provided for description is not valid according to
its description.public Date getDate()
Date with the date of the event.public void setDate(Date date)
Date parameter.date - the date of the event. This paramenter must be a non
null.NullPointerException - if a null value is passed as the value for any
parameter.public String getLocation()
public void setLocation(String location) throws NullPointerException, IllegalArgumentException
location - A no-null, non-empty String, which length is not greater than
100 characters.NullPointerException - If a null String is received.IllegalArgumentException - If received String's length is not between 1 and 100.public int getId()
public User getCreator()
public void setCreator(User creator)
creator - represents the event creatorpublic List<User> getEventsJoinedByUsers()
Copyright © 2015. All rights reserved.