Package my.edu.tarc.dco.bookrentalpos
Class Entity
java.lang.Object
my.edu.tarc.dco.bookrentalpos.Entity
- Direct Known Subclasses:
Book,Member,Staff,Transaction
public class Entity extends Object
Parent class of all entity in POS system
- Version:
- 1.0
- Author:
- Looz
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Overridden equals() method to check against id of the entityStringgetDateCreated()intgetId()StringgetName()voidsetDateCreated(String date)This function shouldn't be used except for initialization purposevoidsetID(int id)This function shouldn't be used except for initialization purposevoidsetName(String name)
-
Constructor Details
-
Method Details
-
equals
Overridden equals() method to check against id of the entity -
getId
public final int getId()- Returns:
- ID of the entity, usually generated by database
-
getName
- Returns:
- name of the entity
-
getDateCreated
- Returns:
- date the entity was created in database, usually generated by database
-
setID
public final void setID(int id)This function shouldn't be used except for initialization purpose- Parameters:
id- id of the entity
-
setName
- Parameters:
name- name of the entity
-
setDateCreated
This function shouldn't be used except for initialization purpose- Parameters:
date- creation date of the entity in database
-