Class DatabaseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
cz.cuni.kubinja.hospitalsystem.database.DatabaseException
All Implemented Interfaces:
Serializable

public class DatabaseException extends Exception
Custom exception connected with the database queries errors tailored for the hospital system.
See Also:
  • Field Details

    • openingDatabaseError

      public static final String openingDatabaseError
      Failure of opening/creating database
      See Also:
    • patientInsertDatabaseError

      public static final String patientInsertDatabaseError
      Failure of inserting patient into database error message
      See Also:
    • doctorInsertDatabaseError

      public static final String doctorInsertDatabaseError
      Failure of inserting doctor into database error message
      See Also:
    • appointmentInsertDatabaseError

      public static final String appointmentInsertDatabaseError
      Failure of inserting appointment into database error message
      See Also:
    • personGetDatabaseError

      public static final String personGetDatabaseError
      Failure of querying person from database error message
      See Also:
    • patientGetDatabaseError

      public static final String patientGetDatabaseError
      Failure of querying patients from database error message
      See Also:
    • doctorGetDatabaseError

      public static final String doctorGetDatabaseError
      Failure of querying doctor from database error message
      See Also:
    • appointmentGetDatabaseError

      public static final String appointmentGetDatabaseError
      Failure of querying appointments from database error message
      See Also:
    • patientUpdateDatabaseError

      public static final String patientUpdateDatabaseError
      Failure to update patient data to the database error message
      See Also:
    • doctorUpdateDatabaseError

      public static final String doctorUpdateDatabaseError
      Failure to update doctor data to the database error message
      See Also:
    • appointmentUpdateDatabaseError

      public static final String appointmentUpdateDatabaseError
      Failure to update appointments data to the database error message
      See Also:
    • patientDeleteDatabaseError

      public static final String patientDeleteDatabaseError
      Failure to delete patient from the database error message
      See Also:
    • doctorDeleteDatabaseError

      public static final String doctorDeleteDatabaseError
      Failure to delete doctor from the database error message
      See Also:
    • appointmentDeleteDatabaseError

      public static final String appointmentDeleteDatabaseError
      Failure to delete appointment from the database error message
      See Also:
    • generalDeleteDatabaseError

      public static final String generalDeleteDatabaseError
      Fails to delete data from database error message
      See Also:
    • invalidTypeOfPersonDatabaseError

      public static final String invalidTypeOfPersonDatabaseError
      Type of person that is retrieved from database by id is not same as expected type
      See Also:
  • Constructor Details

    • DatabaseException

      public DatabaseException(String message)
      Creates databaseException with the provided message.
      Parameters:
      message - Message of the databaseException.
    • DatabaseException

      public DatabaseException(String message1, String message2)
      Creates databaseException with the provided messages. (Concatenates messages into one)
      Parameters:
      message1 - First part of the message.
      message2 - Second part of the message.
    • DatabaseException

      public DatabaseException(String... parts)
      Creates databaseException with the provided message parts. (Concatenates parts into one message)
      Parameters:
      parts - Parts of the message.