com.scooterframework.orm.activerecord
Class ReferenceDataStore

java.lang.Object
  extended by com.scooterframework.orm.activerecord.ReferenceDataStore
All Implemented Interfaces:
java.io.Serializable

public class ReferenceDataStore
extends java.lang.Object
implements java.io.Serializable

ReferenceDataStore class holds static reference data for all users.

See Also:
Serialized Form

Constructor Summary
ReferenceDataStore()
           
 
Method Summary
static java.util.Date getLastReferenceDataLoadedTime()
          Returns the time when reference data is loaded
static ReferenceData getReferenceDataByTypeAndKey(java.lang.String type, java.lang.String keyData)
          Gets ReferenceData by type and key
static ReferenceData getReferenceDataByTypeAndValue(java.lang.String type, java.lang.Object valueData)
          Gets ReferenceData by type and value
static java.util.List<ReferenceData> getReferenceDataList(java.lang.String type)
          Gets a list of ReferenceData instances for a certain type
static void setReferenceData(java.util.Map<java.lang.String,java.util.List<ReferenceData>> dataMap)
          Sets ReferenceData map
static void setReferenceData(java.lang.String type, java.util.List<ReferenceData> data)
          Sets ReferenceData for a certain type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceDataStore

public ReferenceDataStore()
Method Detail

getReferenceDataByTypeAndKey

public static ReferenceData getReferenceDataByTypeAndKey(java.lang.String type,
                                                         java.lang.String keyData)
Gets ReferenceData by type and key

Returns:
ReferenceData

getReferenceDataByTypeAndValue

public static ReferenceData getReferenceDataByTypeAndValue(java.lang.String type,
                                                           java.lang.Object valueData)
Gets ReferenceData by type and value

Returns:
ReferenceData

getReferenceDataList

public static java.util.List<ReferenceData> getReferenceDataList(java.lang.String type)
Gets a list of ReferenceData instances for a certain type

Returns:
List

setReferenceData

public static void setReferenceData(java.util.Map<java.lang.String,java.util.List<ReferenceData>> dataMap)
Sets ReferenceData map

Parameters:
dataMap - a map of reference data

setReferenceData

public static void setReferenceData(java.lang.String type,
                                    java.util.List<ReferenceData> data)
Sets ReferenceData for a certain type

Parameters:
type - type of the data
data - a list of reference data

getLastReferenceDataLoadedTime

public static java.util.Date getLastReferenceDataLoadedTime()
Returns the time when reference data is loaded

Returns:
a date instance