@Entity public class Event extends Object
| Constructor and Description |
|---|
Event(int id,
User organizer,
User creator,
String title,
String head,
String description,
Category category,
String location,
Date start,
Date end) |
Event(User organizer,
User creator,
String title,
String head,
String description,
Category category,
String location,
Date start,
Date end)
Creates a new instance of
Event |
| Modifier and Type | Method and Description |
|---|---|
Set<User> |
getAssistants()
Returns the list of assistants of this event.
|
Category |
getCategory()
Returns the category of the event.
|
User |
getCreator()
Returns the creator of the event.
|
String |
getDescription()
Returns the description of the event.
|
Date |
getEnd()
Returns the date end of this event.
|
String |
getHead()
Returns the head of the event.
|
int |
getId()
Returns the id of the event.
|
String |
getLocation()
Returns the location of the event.
|
User |
getOrganizer()
Returns the organizer of the event.
|
Date |
getStart()
Returns the date start of this event.
|
String |
getTitle()
Returns the title of the event.
|
void |
setAssistants(User assistant)
Sets a assistants of this event.
|
void |
setCategory(Category category)
Sets the category of this event.
|
void |
setCreator(User creator)
Sets the creator of this event.
|
void |
setDescription(String description)
Sets the description of this event.
|
void |
setEnd(Date end)
Sets the date end of this event.
|
void |
setHead(String head)
Sets the head of the event.
|
void |
setLocation(String location)
Sets the location of this event.
|
void |
setOrganizer(User organizer)
Sets the organizer of this event.
|
void |
setStart(Date start)
Sets the date start of this event.
|
void |
setTitle(String title)
Sets the title of this event.
|
public Event(int id,
User organizer,
User creator,
String title,
String head,
String description,
Category category,
String location,
Date start,
Date end)
throws ParseException
ParseExceptionpublic Event(User organizer, User creator, String title, String head, String description, Category category, String location, Date start, Date end) throws ParseException
Eventorganizer - the organizer of the event. This parameter must be a non
null user.creator - the creator of the event. This parameter must be a non
null user.title - the title of the event. This parameter must be a non empty and
non null string with a maximum length of 20 chars.head - the head of the event. This parameter must be a non empty and
non null string with a maximum length of 50 chars.description - the description of the event. This parameter must be a non empty and
non null string with a maximum length of 255 chars.category - the category of the event. This parameter is an enumerated of type Category
that must be a non null.location - the location of the event. This parameter must be a non empty and
non null string with a maximum length of 255 chars.start - the start date of this event. This parameter can not be
null and the date can not be before the current date.end - the end date of this event. This parameter can not be
null and the date can not be before the start date.ParseException - If the date format is not valid according to the format defined.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 int getId()
public User getOrganizer()
public void setOrganizer(User organizer)
organizer - the new organizer of the event. null values not
supported.NullPointerException - if a null value is passed.public User getCreator()
public void setCreator(User creator)
creator - the new creator of the event. null values not
supported.NullPointerException - if a null value is passed.public String getTitle()
public void setTitle(String title)
title - the new title of the event. This parameter must be a non empty
and non null string with a maximum length of 20 chars.NullPointerException - if a null value is passed.IllegalArgumentException - if the length of the string passed is
not valid.public String getHead()
public void setHead(String head)
head - the new head of the event. This parameter must be a non empty
and non null string with a maximum length of 50 chars.NullPointerException - if a null value is passed.IllegalArgumentException - if the length of the string passed is
not valid.public String getDescription()
public void setDescription(String description)
description - the new description of the event. This parameter must be a non empty
and non null string with a maximum length of 255 chars.NullPointerException - if a null value is passed.IllegalArgumentException - if the length of the string passed is
not valid.public Category getCategory()
public void setCategory(Category category)
category - the new category of the event. This parameter is an enumerated of type Category
that must be a non null.NullPointerException - if a null value is passed.public String getLocation()
public void setLocation(String location)
location - the new location of the event. This parameter must be a non empty
and non null string with a maximum length of 255 chars.NullPointerException - if a null value is passed.IllegalArgumentException - if the length of the string passed is
not valid.public Date getStart()
public void setStart(Date start) throws ParseException
start - the new date of start for this event. This parameter can not
be null and the date can not be before the 1900 year.NullPointerException - if a null value is passed.IllegalArgumentException - if the value provided is before the
1900 year.ParseException - If the date format is not valid according to the format defined.public Date getEnd()
public void setEnd(Date end) throws ParseException
end - the new date of end for this event. This parameter can not
be null and the date can not be before the start date.NullPointerException - if a null value is passed.IllegalArgumentException - if the value provided is before the start date.ParseException - If the date format is not valid according to the format defined.public Set<User> getAssistants()
public void setAssistants(User assistant)
null values not
supported.assistant - a new assistant of the event. null values not
supported.NullPointerException - if a null value is passed.Copyright © 2016. All rights reserved.