Package Common
Interface DatabaseItems
- All Known Implementing Classes:
Account
,AppointmentOutcome
,AppointmentSlot
,InventoryRequest
,MedicalRecord
,Medicines
public interface DatabaseItems
The
DatabaseItems
interface defines the methods that
any database item should implement. This includes serialization,
deserialization, and printing item details.-
Method Summary
Modifier and TypeMethodDescriptionvoid
deserialise
(String... params) Deserializes the database item from a set of parameters.void
Prints the details of the database item to standard output.Serializes the database item into a string representation.
-
Method Details
-
serialise
String serialise()Serializes the database item into a string representation.- Returns:
- a string that represents the serialized form of the database item
-
deserialise
Deserializes the database item from a set of parameters.- Parameters:
params
- an array of strings containing the data needed to reconstruct the database item. The exact format and number of parameters depend on the specific implementation of this interface.
-
printItem
void printItem()Prints the details of the database item to standard output. This method is expected to provide a human-readable representation of the item's attributes.
-