Class DBControllerPerson
java.lang.Object
lukas.wais.smart.mirror.controller.DBController
lukas.wais.smart.mirror.controller.DBControllerPerson
public class DBControllerPerson extends DBController
The Class DBControllerPerson provide the statements for the data manipulation
for the database table SM_USERS
- Author:
- Omar Duenas
-
Constructor Summary
Constructors Constructor Description DBControllerPerson()
-
Method Summary
Modifier and Type Method Description void
deletePerson(java.lang.String iD)
Delete the desire person by IDvoid
insertPerson(Person person)
Insert a new person to the table SM_USERS.static java.util.List<Person>
selectAllPersons()
Select all the information of the persons in the table SM_USERS.static Person
selectPerson(java.lang.String iD)
Select all the information of a person for the corresponding ID.void
updateEM(java.lang.String email, java.lang.String iD)
Update the person email for the given IDvoid
updateFN(java.lang.String firstName, java.lang.String iD)
Update the person firstname for the given IDvoid
updateLN(java.lang.String lastName, java.lang.String iD)
Update the person lastname for the given IDvoid
updateNK(java.lang.String nikeName, java.lang.String iD)
Update the person nickname for the given ID
-
Constructor Details
-
DBControllerPerson
public DBControllerPerson()
-
-
Method Details
-
selectPerson
Select all the information of a person for the corresponding ID.- Parameters:
iD
- of the desire user as an input parameter- Returns:
- the person data found in the database
-
selectAllPersons
Select all the information of the persons in the table SM_USERS.- Returns:
- the list of found persons
-
insertPerson
Insert a new person to the table SM_USERS.- Parameters:
person
- the person
-
updateFN
public void updateFN(java.lang.String firstName, java.lang.String iD)Update the person firstname for the given ID- Parameters:
firstName
- the new first name to be updatediD
- the ID of the person to be updated
-
updateLN
public void updateLN(java.lang.String lastName, java.lang.String iD)Update the person lastname for the given ID- Parameters:
lastName
- the new last name to be updatediD
- the ID of the person to be updated
-
updateNK
public void updateNK(java.lang.String nikeName, java.lang.String iD)Update the person nickname for the given ID- Parameters:
nikeName
- the new nickname to be updatediD
- the ID of the person to be updated
-
updateEM
public void updateEM(java.lang.String email, java.lang.String iD)Update the person email for the given ID- Parameters:
email
- the new email to be updatediD
- the ID of the person to be updated
-
deletePerson
public void deletePerson(java.lang.String iD)Delete the desire person by ID- Parameters:
iD
- the iD of the person to be deleted
-