Class CycleInfo

java.lang.Object
org.deltava.beans.navdata.CycleInfo
All Implemented Interfaces:
Serializable, Comparable<CycleInfo>, ViewEntry, Cacheable

public class CycleInfo extends Object implements Cacheable, ViewEntry, Comparable<CycleInfo>
A bean to store Navigation Data cycle information.
Since:
5.1
Version:
8.0
Author:
Luke
See Also:
  • Constructor Details

    • CycleInfo

      public CycleInfo(String cycleID)
      Creates the cycle information bean.
      Parameters:
      cycleID - the navigqation cycle ID
    • CycleInfo

      public CycleInfo(String cycleID, Instant releaseDate)
      Creates the cycle information bean.
      Parameters:
      cycleID - the navigqation cycle ID
      releaseDate - the cycle release datae
  • Method Details

    • getYear

      public int getYear()
      Returns the year.
      Returns:
      the year
    • getSequence

      public int getSequence()
      Returns the sequence number.
      Returns:
      the sequence
    • getID

      public String getID()
      Returns the Cycle ID.
      Returns:
      the ID
    • getReleasedOn

      public Instant getReleasedOn()
      Returns the cycle release date.
      Returns:
      the release date
    • isLoaded

      public boolean isLoaded()
      Returns whether this cycle is currently loaded.
      Returns:
      TRUE if loaded, otherwise FALSE
    • setReleasedOn

      public void setReleasedOn(Instant dt)
      Updates the cycle release datae.
      Parameters:
      dt - the release date
    • setLoaded

      public void setLoaded(boolean isLoaded)
      Sets whether this cycle is currently loaded.
      Parameters:
      isLoaded - TRUE if loaded, otherwise FALSE
    • 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
    • compareTo

      public int compareTo(CycleInfo c2)
      Specified by:
      compareTo in interface Comparable<CycleInfo>
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getCurrent

      public static CycleInfo getCurrent()
      Guesses at the current cycle based on year and date.
      Returns:
      a CycleInfo bean