Package be.gaudry.model.person
Class Person
java.lang.Object
be.gaudry.model.AbstractLightObject
be.gaudry.model.person.Person
- All Implemented Interfaces:
ILightObject
,Serializable
- Since:
- 1.0 Nov 30, 2007, 0.0.4-SNAPSHOT
- Version:
- %I%, %G%
- Author:
- Steph GAUDRY
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface be.gaudry.model.ILightObject
DEFAULT_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
Indicates whether some other object is "equal to" this person.Returns a String with the last name and the first name.int
getId()
Identifier of the ILightObjectint
hashCode()
Returns a hash code value for the person.void
setBirthdate(Date birthdate)
void
setDisplay(String display)
Sets the last name by calling thesetLastName(String)
method.void
setFirstName(String firstName)
void
void
setId(int id)
void
setLastName(String lastName)
toString()
Builds a string with variables values and the class.
-
Field Details
-
FIND_ALL_QUERY
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Person
public Person() -
Person
- Parameters:
id
-lastName
-
-
Person
Create a person with only a lastName and a firstName. Person id has -1 value- Parameters:
lastName
-firstName
-
-
-
Method Details
-
getId
public int getId()Description copied from interface:ILightObject
Identifier of the ILightObject- Returns:
- the id
-
setId
public void setId(int id)- Parameters:
id
- the id to set- See Also:
ILightObject.getId()
-
copy
-
getDisplay
Returns a String with the last name and the first name.- Returns:
- the display
-
setDisplay
Sets the last name by calling thesetLastName(String)
method.- Parameters:
display
- String representation of the object- See Also:
Person(int, String)
-
equals
Indicates whether some other object is "equal to" this person. \nCheck is done on following fields :- id
- fields checked into the
AbstractLightObject
equals
method - fields checked into the
Identity
equals
method
- Overrides:
equals
in classAbstractLightObject
- Parameters:
obj
- the reference object with which to compare.- Returns:
true
if this person is the same as the obj argument;false
otherwise.- See Also:
Object.equals(java.lang.Object)
,hashCode()
-
hashCode
public int hashCode()Returns a hash code value for the person.
Hash is done on following fields :- Overrides:
hashCode
in classAbstractLightObject
- Returns:
- a hash code value for this person.
- See Also:
Object.hashCode()
,equals(Object)
-
toString
Description copied from class:AbstractLightObject
Builds a string with variables values and the class.- Overrides:
toString
in classAbstractLightObject
- Returns:
- a String representation of this LightObject only for debugging
- See Also:
Object.toString()
-
getBirthdate
-
getFirstName
-
getLastName
-
getGender
-
setBirthdate
-
setFirstName
-
setLastName
-
setGender
-