Class Database.Entry

java.lang.Object
edu.uky.cs.nil.tt.Database.Entry
All Implemented Interfaces:
Named
Direct Known Subclasses:
Database.Listable
Enclosing class:
Database

public static class Database.Entry extends Object implements Named
A database entry represents an individual elements in the database, including its meta-data, such as its title and description.
Author:
Stephen G. Ware
  • Constructor Details

    • Entry

      public Entry(String name, String title, String description)
      Constructs a database entry with the given meta-data.
      Parameters:
      name - the system name for this entry
      title - the title for the entry that will be shown to users
      description - the longer description of the entry that will be shown to users
    • Entry

      public Entry(String name)
      Constructs a database entry from only a name.
      Parameters:
      name - system name for this entry
    • Entry

      public Entry(Database.Entry other)
      Constructs a database entry that copies the meta-data of an existing database entry.
      Parameters:
      other - another database entry whose meta-data will be copied
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Description copied from interface: Named
      Returns this object's unique name that distinguishes it from other objects of the same type in the same context.
      Specified by:
      getName in interface Named
      Returns:
      the object's unique name
    • getTitle

      public String getTitle()
      Returns this entry's title, which is a short name meant to be reader by human users.
      Returns:
      the title
    • setTitle

      protected void setTitle(String title)
      Sets the title of this entry.
      Parameters:
      title - the new title
    • getDescription

      public String getDescription()
      Returns this entry's description, which is a longer explanation of what this entity provides meant to help human users decide if they are interested in this entity.
      Returns:
      the description
    • setDescription

      protected void setDescription(String description)
      Sets the description of this entry.
      Parameters:
      description - the new description