@Entity public class Facility extends Object
| Constructor and Description |
|---|
Facility()
Default empty constructor
|
Facility(String name,
String contactPerson,
String contactMail,
User manager)
Basic constructor with minimal attributes
|
Facility(User manager,
String name,
String acronym,
String description,
String address,
String city,
String province,
String postalCode,
String contactPerson,
String contactMail,
Date deleted)
Testing purposes
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Set the logical deleted state of the facility, setting the deletion date to
current timestamp
|
boolean |
equals(Object obj)
Equals based on Id autogenerated by JPA
|
String |
getAcronym()
Gets short name of the facility
|
String |
getAddress()
Gets the adress of the facility
|
String |
getCity()
Gets the city of the facility
|
String |
getContactMail()
Gets the mail of contact of this facility
|
String |
getContactPerson()
Gets the name of the person that
|
Date |
getDeleted()
Set a delete date
|
String |
getDescription()
Gets the description of the facility
|
Long |
getId()
Get unique identifier of the facility
|
User |
getManager()
Gets user that manages this facility
|
String |
getName()
Gets this facility's name
|
String |
getPostalCode()
Gets this facility postal code
|
String |
getProvince()
Gets the province of this facility
|
int |
hashCode() |
boolean |
isDeleted()
Get the deletion state of the facility
|
void |
setAcronym(String acronym)
Sets the short name of the facility
|
void |
setAddress(String address)
Sets the address of the facility
|
void |
setCity(String city)
Sets the city
|
void |
setContactMail(String contactMail)
Sets the mail of contact of this facility
|
void |
setContactPerson(String contactPerson)
Sets the contact person
|
void |
setDeleted(Date deleted)
Date of deletion
|
void |
setDescription(String description)
Sets the description of the facility
|
void |
setId(Long id)
Sets the unique identifier of the facility
|
void |
setManager(User manager)
Sets user that manages this facility
|
void |
setName(String name)
Sets this facility's name
|
void |
setPostalCode(String postalCode)
Sets this facility postal code
|
void |
setProvince(String province)
Sets this facility's province
|
String |
toString()
toString of the facility's identifier
|
void |
undelete()
Set the logical undeleted state of the facility, setting the deletion date to
null
|
public Facility()
public Facility(String name, String contactPerson, String contactMail, User manager)
name - facility's namecontactPerson - contact person of the facilitycontactMail - facility's contact person's mailmanager - user that manages this facilitypublic Facility(User manager, String name, String acronym, String description, String address, String city, String province, String postalCode, String contactPerson, String contactMail, Date deleted)
manager - facility's managername - facility's nameacronym - facility's acronymdescription - facility's descriptionaddress - facility's adresscity - facility's cityprovince - facility's provincepostalCode - facility's postal codecontactPerson - facility's contactPerson's namecontactMail - facility's contactPerson's maildeleted - if it sets a Date it flags the facility as deletedpublic Long getId()
public void setId(Long id)
id - identifier to be setpublic User getManager()
public void setManager(User manager)
manager - user to be set as managerpublic String getName()
public void setName(String name)
name - name to be setpublic String getAcronym()
public void setAcronym(String acronym)
acronym - this facility acronympublic String getDescription()
public void setDescription(String description)
description - description to be setpublic String getAddress()
public void setAddress(String address)
address - address to be setpublic String getCity()
public void setCity(String city)
city - city to be setpublic String getProvince()
public void setProvince(String province)
province - province to be setypublic String getPostalCode()
public void setPostalCode(String postalCode)
postalCode - postal code to be setpublic String getContactPerson()
public void setContactPerson(String contactPerson)
contactPerson - name of the person to be setpublic String getContactMail()
public void setContactMail(String contactMail)
contactMail - mail to be setpublic Date getDeleted()
public void setDeleted(Date deleted)
deleted - null to undelete, a date to deletepublic boolean isDeleted()
public void delete()
public void undelete()
public boolean equals(Object obj)
Copyright © 2018. All rights reserved.