Class DataStorage
- java.lang.Object
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.DataStorage
-
public class DataStorage extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataStorage.Updates
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DataStorage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
clear(Context context)
static byte[]
getBlob(Context context, int id, byte[] defaultValue)
boolean
getBoolean(Context context, int id, boolean defaultValue)
static float
getFloat(Context context, int id, float defaultValue)
static int
getInt(Context context, int id, int defaultValue)
static long
getLong(Context context, int id, long defaultValue)
static Weather.WeatherLocation
getSetStationLocation(Context context)
static java.lang.String
getString(Context context, int id, java.lang.String defaultValue)
static void
printPackages(Context context, java.util.ArrayList<DataPackage> dataPackages)
static java.util.ArrayList<DataPackage>
readAllPackages(Context context)
static DataPackage
readDataPackage(Context context, int id)
static void
setBlob(Context context, int id, byte[] value)
static void
setBoolean(Context context, int id, boolean value)
static void
setFloat(Context context, int id, float value)
static void
setInt(Context context, int id, int value)
static void
setLong(Context context, int id, long value)
static void
setStation(Context context, Weather.WeatherLocation weatherLocation)
static void
setString(Context context, int id, java.lang.String value)
-
-
-
Field Detail
-
DATASTORAGE_STATION
public static final int DATASTORAGE_STATION
- See Also:
- Constant Field Values
-
DATASTORAGE_TEST
public static final int DATASTORAGE_TEST
- See Also:
- Constant Field Values
-
DATASTORAGE_POLLENREGION_ID
public static final int DATASTORAGE_POLLENREGION_ID
- See Also:
- Constant Field Values
-
DATASTORAGE_POLLENPARTREGION_ID
public static final int DATASTORAGE_POLLENPARTREGION_ID
- See Also:
- Constant Field Values
-
DATASTORAGE_POLLENREGION_DESCRIPTION
public static final int DATASTORAGE_POLLENREGION_DESCRIPTION
- See Also:
- Constant Field Values
-
DATASTORAGE_LASTGPSFIX
public static final int DATASTORAGE_LASTGPSFIX
- See Also:
- Constant Field Values
-
DATASTORAGE_NOTIFICATION_IDENTIFIER
public static final int DATASTORAGE_NOTIFICATION_IDENTIFIER
- See Also:
- Constant Field Values
-
DATASTORAGE_LAST_NOTIFICATIONS_UPDATE_TIME
public static final int DATASTORAGE_LAST_NOTIFICATIONS_UPDATE_TIME
- See Also:
- Constant Field Values
-
DATASTORAGE_NC_CHANNEL_DETAIL
public static final int DATASTORAGE_NC_CHANNEL_DETAIL
- See Also:
- Constant Field Values
-
DATASTORAGE_WEATHERUPDATEDFLAG
public static final int DATASTORAGE_WEATHERUPDATEDFLAG
- See Also:
- Constant Field Values
-
DATASTORAGE_RADAR_LASTDATAPOLL
public static final int DATASTORAGE_RADAR_LASTDATAPOLL
- See Also:
- Constant Field Values
-
DATASTORAGE_VIEWS_LAST_UPDATE_TIME
public static final int DATASTORAGE_VIEWS_LAST_UPDATE_TIME
- See Also:
- Constant Field Values
-
DATASTORAGE_GADGETBRIDGE_LASTUPDATE
public static final int DATASTORAGE_GADGETBRIDGE_LASTUPDATE
- See Also:
- Constant Field Values
-
DATASTORAGE_POLLENREGION_ID_DEFAULT
public static final int DATASTORAGE_POLLENREGION_ID_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_POLLENPARTREGION_ID_DEFAULT
public static final int DATASTORAGE_POLLENPARTREGION_ID_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_POLLENREGION_DESCRIPTION_DEFAULT
public static final java.lang.String DATASTORAGE_POLLENREGION_DESCRIPTION_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_LASTGPSFIX_DEFAULT
public static final long DATASTORAGE_LASTGPSFIX_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_NOTIFICATION_IDENTIFIER_DEFAULT
public static final int DATASTORAGE_NOTIFICATION_IDENTIFIER_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_LAST_NOTIFICATIONS_UPDATE_TIME_DEFAULT
public static final long DATASTORAGE_LAST_NOTIFICATIONS_UPDATE_TIME_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_NC_CHANNEL_DETAIL_DEFAULT
public static final long DATASTORAGE_NC_CHANNEL_DETAIL_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_WEATHERUPDATEDFLAG_DEFAULT
public static final int DATASTORAGE_WEATHERUPDATEDFLAG_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_RADAR_LASTDATAPOLL_DEFAULT
public static final long DATASTORAGE_RADAR_LASTDATAPOLL_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_VIEWS_LAST_UPDATE_TIME_DEFAULT
public static final long DATASTORAGE_VIEWS_LAST_UPDATE_TIME_DEFAULT
- See Also:
- Constant Field Values
-
DATASTORAGE_GADGETBRIDGE_LASTUPDATE_DEFAULT
public static final long DATASTORAGE_GADGETBRIDGE_LASTUPDATE_DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
readAllPackages
public static java.util.ArrayList<DataPackage> readAllPackages(Context context)
-
printPackages
public static void printPackages(Context context, java.util.ArrayList<DataPackage> dataPackages)
-
readDataPackage
public static DataPackage readDataPackage(Context context, int id)
-
clear
public static void clear(Context context)
-
setBlob
public static void setBlob(Context context, int id, byte[] value)
-
getBlob
public static byte[] getBlob(Context context, int id, byte[] defaultValue)
-
setFloat
public static void setFloat(Context context, int id, float value)
-
getFloat
public static float getFloat(Context context, int id, float defaultValue)
-
setInt
public static void setInt(Context context, int id, int value)
-
getInt
public static int getInt(Context context, int id, int defaultValue)
-
setLong
public static void setLong(Context context, int id, long value)
-
getLong
public static long getLong(Context context, int id, long defaultValue)
-
setString
public static void setString(Context context, int id, java.lang.String value)
-
getString
public static java.lang.String getString(Context context, int id, java.lang.String defaultValue)
-
setBoolean
public static void setBoolean(Context context, int id, boolean value)
-
getBoolean
public boolean getBoolean(Context context, int id, boolean defaultValue)
-
setStation
public static void setStation(Context context, Weather.WeatherLocation weatherLocation)
-
getSetStationLocation
public static Weather.WeatherLocation getSetStationLocation(Context context)
-
-