Class ClientPostgresRepository

java.lang.Object
io.github.marcopaglio.booking.repository.postgres.ClientPostgresRepository
All Implemented Interfaces:
ClientRepository

public class ClientPostgresRepository extends Object implements ClientRepository
Implementation of repository layer through PostgreSQL for Client entities of the booking application.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClientPostgresRepository(jakarta.persistence.EntityManager em)
    Constructs a repository layer for Client entities using PostgreSQL database.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(Client client)
    Removes the unique specified client from the PostgreSQL database, if it exists, otherwise it does nothing.
    Retrieves all the clients from the PostgreSQL database in a list.
    Retrieves the unique client with the specified identifier from the PostgreSQL database, if it exists.
    findByName(String firstName, String lastName)
    Retrieves the unique client with the specified name and surname from the PostgreSQL database, if it exists.
    save(Client client)
    Inserts a new Client in the PostgreSQL database or saves changes of an existing one.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClientPostgresRepository

      public ClientPostgresRepository(jakarta.persistence.EntityManager em)
      Constructs a repository layer for Client entities using PostgreSQL database.
      Parameters:
      em - the EntityManager used to communicate with PostgreSQL database.
  • Method Details