java.lang.Object
de.powerstat.validation.entities.Person
- All Implemented Interfaces:
IEntity
,Comparable<Person>
Person.
DSGVO relevant.
TODO birth place (optional)
TODO death place (optional)
TODO history of citizenships
TODO Identity card number at different times
TODO eye color
TODO Skin color
TODO body height at different times (24cm - 272cm)
TODO body weight at different times (212g - 635kg)
TODO body temperature at different times
TODO characteristics
TODO Zahnstatus at differet times
TODO DNA
TODO faceid, fingerid, eyeid at different times
TODO Signature(s)
TODO Namenszusätze: Adelstitel, Academic title since, Work titles/qualifications since
TODO ... Nicknames at different times
TODO Address(es) at different times
TODO Communication typ(s) at different times
TODO photo(s) at different times
TODO voice recordings at different times
TODO ? marriage(s) / divorce(s) at different times
TODO relationship(s), children, parents, siblings, ... at different times
TODO languages (reading, writing, speeking, understanding, level) since
TODO ownership at different times
TODO knowledge since
TODO get vcard ?
TODO Change DateTime of an entry to an earlier entry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Optional<OffsetDateTime>
Birthday if known with time or 00:00:00.private Optional<BloodGroup>
Blood group.Call name at different times.private Optional<OffsetDateTime>
Death date if not still alive, with time or 00:00:00.First names at different times.Lastnames at different times.private static final org.apache.logging.log4j.Logger
Logger.Gender/sex at different times.private final UUID
Universally Unique Identifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFirstnames
(OffsetDateTime since, List<Firstname> names) Add firstnames.void
addGender
(OffsetDateTime since, Gender gender) Add gender.void
addLastname
(OffsetDateTime since, Lastname name) Add lastname.int
Compare with another object.boolean
Is equal with another object.Get birthday.Get blood group.Get death date.private static String
getFirstnames
(HistoryOf<List<Firstname>> firstnames) Get firstnames as string.Get actual firstnames.Get firstnames at birth.Get previous firstnames.Get actual gender.Get gender at birth.Get previous gender.Get actual lastname.Get lastname at birth.Get previous lastname.int
hashCode()
Calculate hash code.static Person
of()
Person factory.static Person
Person factory.static Person
Person factory.static Person
Person factory.void
setBirthday
(OffsetDateTime date) Set birthday.void
setBloodGroup
(BloodGroup bloodGroup) Set blood group.void
setDeathdate
(OffsetDateTime date) Set death date.Returns the value of this Person as a string.toString()
Returns the string representation of this Person.
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGERLogger. -
uuid
Universally Unique Identifier. -
lastname
Lastnames at different times. -
sex
Gender/sex at different times. -
firstnames
First names at different times. -
callname
Call name at different times. -
birthday
Birthday if known with time or 00:00:00. -
deathdate
Death date if not still alive, with time or 00:00:00. -
bloodGroup
Blood group.
-
-
Constructor Details
-
Person
private Person()Private default constructor.
-
-
Method Details
-
of
Person factory.- Returns:
- Person object
-
of
Person factory.- Parameters:
lastname
- Lastnamegender
- Gender- Returns:
- Person object
-
of
Person factory.- Parameters:
lastname
- Lastnamegender
- Genderfirstnames
- Firstnames- Returns:
- Person object
-
of
public static Person of(Lastname lastname, Gender gender, List<Firstname> firstnames, OffsetDateTime birthdate) Person factory.- Parameters:
lastname
- Lastnamegender
- Genderfirstnames
- Firstnamesbirthdate
- Birthdate- Returns:
- Person object
-
stringValue
Returns the value of this Person as a string.- Specified by:
stringValue
in interfaceIEntity
- Returns:
- The text value represented by this object after conversion to type string (lastname, firstnames).
-
hashCode
public int hashCode()Calculate hash code. -
equals
Is equal with another object. -
toString
Returns the string representation of this Person. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "Person[person=]" -
getFirstnames
Get firstnames as string.- Parameters:
firstnames
- Firstnames- Returns:
- Firstnames as string
-
compareTo
Compare with another object.- Specified by:
compareTo
in interfaceComparable<Person>
- Parameters:
obj
- Object to compare with- Returns:
- 0: equal; 1: greater; -1: smaller
- See Also:
-
getLastnameAtBirth
Get lastname at birth.- Returns:
- First known lastname
-
getLastnameActual
Get actual lastname.- Returns:
- Last known lastname
-
getLastnamePrevious
Get previous lastname.- Returns:
- Previous lastname or actual lastname/lastname at birth
-
addLastname
Add lastname.- Parameters:
since
- Since datetimename
- Lastname- Throws:
NullPointerException
- If since and/or lastname is/are nullIndexOutOfBoundsException
- If since lies in the futureIllegalArgumentException
- If lastname is larger than 40 characters or includes illegal characters
-
getGenderAtBirth
Get gender at birth.- Returns:
- First known gender
-
getGenderActual
Get actual gender.- Returns:
- Last known gender
-
getGenderPrevious
Get previous gender.- Returns:
- Previous gender or actual gender/gender at birth
-
addGender
Add gender.- Parameters:
since
- Since datetimegender
- Gender- Throws:
IndexOutOfBoundsException
- If since lies in the future
-
getFirstnamesAtBirth
Get firstnames at birth.- Returns:
- List og first known firstnames
-
getFirstnamesActual
Get actual firstnames.- Returns:
- List pf last known firstnames
-
getFirstnamesPrevious
Get previous firstnames.- Returns:
- Previous firstnames or actual firstnames/firstnames at birth
-
addFirstnames
Add firstnames.- Parameters:
since
- Since datetimenames
- Firstnames- Throws:
NullPointerException
- If since and/or firstnames is/are nullIndexOutOfBoundsException
- If since lies in the futureIllegalArgumentException
- If firstnames is larger than 32 characters or includes illegal characters
-
setBirthday
Set birthday.- Parameters:
date
- Birthday date with 00:00:00 or with exact birth time or null.
-
getBirthday
Get birthday.- Returns:
- Optional OffsetDateTime
-
setDeathdate
Set death date.- Parameters:
date
- Death date date with 00:00:00 or with exact death time or null.- Throws:
IllegalArgumentException
- If birthday > death date
-
getDeathdate
Get death date.- Returns:
- Optional OffsetDateTime
-
setBloodGroup
Set blood group.- Parameters:
bloodGroup
- Blood group
-
getBloodGroup
Get blood group.- Returns:
- Optional BloodGroup
-