Class ScaleScrollerDatabase.Converters
- java.lang.Object
-
- edu.cnm.deepdive.scalescroller.service.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 Summary
Constructors Constructor Description Converters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LongdateToLong(Date value)Converts aDateobject into a Long.static ModeintegerToMode(Integer value)Converts an Integer into aModeobject.static NoteintegerToNote(Integer value)Converts an Integer into aNoteobject.static DatelongToDate(Long value)Converts a Long into aDateobject.static IntegermodeToInteger(Mode mode)Converts aModeobject into an Integer.static IntegernoteToInteger(Note note)Converts aNoteobject into an Integer.
-
-
-
Method Detail
-
dateToLong
public static Long dateToLong(Date value)
Converts aDateobject into a Long.- Parameters:
value- ADateobject.- Returns:
- A Long.
-
longToDate
public static Date longToDate(Long value)
Converts a Long into aDateobject.- Parameters:
value- A Long.- Returns:
- A
Dateobject.
-
noteToInteger
public static Integer noteToInteger(Note note)
Converts aNoteobject into an Integer.- Parameters:
note- ANoteobject.- Returns:
- An Integer.
-
integerToNote
public static Note integerToNote(Integer value)
Converts an Integer into aNoteobject.- Parameters:
value- An Integer.- Returns:
- A
Noteobject.
-
modeToInteger
public static Integer modeToInteger(Mode mode)
Converts aModeobject into an Integer.- Parameters:
mode- AModeobject.- Returns:
- An Integer.
-
-