Class Chart

All Implemented Interfaces:
Serializable, Comparable<Object>, ComboAlias, IDBean, UseCount, ViewEntry, Cacheable
Direct Known Subclasses:
ExternalChart

public class Chart extends ImageBean implements ComboAlias, UseCount, ViewEntry
A class for storing approach/procedure chart data.
Since:
1.0
Version:
10.6
Author:
Luke
See Also:
  • Constructor Details

    • Chart

      public Chart(String name, Airport a)
      Create a new Chart with a name and an Airport.
      Parameters:
      name - the chart name
      a - the airport
      Throws:
      NullPointerException - if name is null
  • Method Details

    • getAirport

      public Airport getAirport()
      Return the chart's Airport.
      Returns:
      the Airport bean associated with this chart
      See Also:
    • getName

      public String getName()
      Return the chart name.
      Returns:
      the chart name
      See Also:
    • getImgFormat

      public Chart.ImageFormat getImgFormat()
      Return the chart's image type.
      Returns:
      the ImageType
      See Also:
    • getImageType

      public ImageType getImageType()
      Description copied from class: ImageBean
      Returns the database image type.
      Specified by:
      getImageType in class ImageBean
      Returns:
      an ImageType
    • getType

      public Chart.Type getType()
      Returns the chart type.
      Returns:
      the chart type
      See Also:
    • getIsExternal

      public boolean getIsExternal()
      Returns whether this is an external chart.
      Returns:
      FALSE
    • getUseCount

      public int getUseCount()
      Returns the number of times this chart has been viewed.
      Specified by:
      getUseCount in interface UseCount
      Returns:
      the number of views
      See Also:
    • getLastModified

      public Instant getLastModified()
      Returns the last modification date of the chart.
      Returns:
      the modification date/time
    • setLastModified

      public void setLastModified(Instant dt)
      Updates the last modification date of the chart.
      Parameters:
      dt - the modification date/time
    • setName

      public void setName(String name)
      Updates the Chart name.
      Parameters:
      name - the new name
      Throws:
      NullPointerException - if name is null
      See Also:
    • setAirport

      public void setAirport(Airport a)
      Updates the Airport.
      Parameters:
      a - the new Airport
      See Also:
    • setType

      public void setType(Chart.Type t)
      Set the chart type.
      Parameters:
      t - the chart Type
    • setImgFormat

      public void setImgFormat(Chart.ImageFormat fmt)
      Set the chart image format.
      Parameters:
      fmt - the ImageFormat
      See Also:
    • setUseCount

      public void setUseCount(int cnt)
      Updates the number of times this chart has been viewed.
      Parameters:
      cnt - the number of views
      See Also:
    • compareTo

      public int compareTo(Object o2)
      Compares two Charts by comparing their Airports, then their names.
      Specified by:
      compareTo in interface Comparable<Object>
      Overrides:
      compareTo in class DatabaseBean
    • getRowClassName

      public String getRowClassName()
      Description copied from interface: ViewEntry
      Returns the CSS class for this object if rendered in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name, or NULL if none
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class DatabaseBean
    • getComboName

      public String getComboName()
      Description copied from interface: ComboAlias
      Returns the visible name to use in the HTML <OPTION> element.
      Specified by:
      getComboName in interface ComboAlias
      Returns:
      The visible name for this entry
    • getComboAlias

      public String getComboAlias()
      Description copied from interface: ComboAlias
      Returns the alias to use in the HTML <OPTION> element.
      Specified by:
      getComboAlias in interface ComboAlias
      Returns:
      The alias for this entry
    • toString

      public String toString()
      Overrides:
      toString in class Object