Class ScaleScrollerDatabase.Converters

  • Enclosing class:
    ScaleScrollerDatabase

    public static class ScaleScrollerDatabase.Converters
    extends Object
    Provides type converters to translate Java objects into data that can be stored in the SQLite database.
    • Constructor Detail

      • Converters

        public Converters()
    • Method Detail

      • dateToLong

        public static Long dateToLong​(Date value)
        Converts a Date object into a Long.
        Parameters:
        value - A Date object.
        Returns:
        A Long.
      • longToDate

        public static Date longToDate​(Long value)
        Converts a Long into a Date object.
        Parameters:
        value - A Long.
        Returns:
        A Date object.
      • noteToInteger

        public static Integer noteToInteger​(Note note)
        Converts a Note object into an Integer.
        Parameters:
        note - A Note object.
        Returns:
        An Integer.
      • integerToNote

        public static Note integerToNote​(Integer value)
        Converts an Integer into a Note object.
        Parameters:
        value - An Integer.
        Returns:
        A Note object.
      • modeToInteger

        public static Integer modeToInteger​(Mode mode)
        Converts a Mode object into an Integer.
        Parameters:
        mode - A Mode object.
        Returns:
        An Integer.
      • integerToMode

        public static Mode integerToMode​(Integer value)
        Converts an Integer into a Mode object.
        Parameters:
        value - An Integer.
        Returns:
        A Mode object.