|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.axeda.esrs.sdk.SDKFacade
public class SDKFacade
Created by IntelliJ IDEA. User: kholbrook Date: Dec 15, 2008 Time: 10:21:47 AM To change this template use File | Settings | File Templates.
| Constructor Summary | |
|---|---|
SDKFacade()
|
|
| Method Summary | |
|---|---|
static Device |
createDevice(Context context,
java.lang.String serialNumber,
Model model)
Creates a new SDK Device with the supplied serialnumber and model, then retrieves it from the DB and returns the persisted instance of the Device. |
static Location |
createLocation(Context context,
java.lang.String locationName,
java.lang.String locationLine1,
java.lang.String locationLine2,
java.lang.String city,
java.lang.String stateOrProvince,
java.lang.String postalCode,
java.lang.String country,
boolean persist)
Create an IN-MEMORY or PERSISTED location. |
static Model |
createModel(Context context,
java.lang.String modelName)
Creates a new SDK Model with the supplied name, then retrieves it from the DB and returns the persisted instance of the Model. |
static Organization |
createNewOrganization(Context context,
java.lang.String name,
Location location)
Creates a new Organization in the DB, with the given name and a new Location (cannot have been persisted) |
static DataValue |
findCurrentDataItemValue(Context context,
Device device,
java.lang.String dataItemName)
Returns the currentDataValue for a given Device and DataItemName. |
static DataValueList |
findHistoricalDataItemValue(Context context,
Device device,
java.lang.String dataItemName)
Returns the currentDataValue for a given Device and DataItemName. |
static DataItem |
loadDataItem(Context context,
Model model,
java.lang.String dataItemName)
Lookup a DataItem from the database for a specific model and dataitem name |
static Device |
loadDevice(Context context,
Identifier id)
Loads a Device from the DB based on the Serial Number and the Model |
static Device |
loadDevice(Context context,
java.lang.String serialNumber,
Model model)
Loads a Device from the DB based on the Serial Number and the Model |
static Location |
loadLocation(Context context,
java.lang.String locationName,
java.lang.String locationLine1,
java.lang.String city,
java.lang.String postalCode,
java.lang.String stateOrProvince,
java.lang.String country)
Load a location by a combination of parameters. |
static Model |
loadModel(Context context,
java.lang.String modelName)
Loads a model from the DB based on the model name. |
static Organization |
loadOrganization(Context context,
java.lang.String name)
Loads an organization from the DB based on the organization name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SDKFacade()
| Method Detail |
|---|
public static Model createModel(Context context,
java.lang.String modelName)
context - Valid SDK ContextmodelName - The name of the Model
public static Model loadModel(Context context,
java.lang.String modelName)
context - Valid SDK ContextmodelName - The name of the Model to load
public static Device createDevice(Context context,
java.lang.String serialNumber,
Model model)
context - Valid SDk ContextserialNumber - The Serial Number for the Devicemodel - A persisted SDK Model
public static Device loadDevice(Context context,
java.lang.String serialNumber,
Model model)
context - Valid SDK ContextserialNumber - The Serial Number of the Devicemodel - The persisted copy of the Model for this Device
public static Device loadDevice(Context context,
Identifier id)
context - Valid SDK Contextid - The ID of the Device
public static Location createLocation(Context context,
java.lang.String locationName,
java.lang.String locationLine1,
java.lang.String locationLine2,
java.lang.String city,
java.lang.String stateOrProvince,
java.lang.String postalCode,
java.lang.String country,
boolean persist)
context - Valid SDK ContextlocationName - Name of the locationlocationLine1 - First address linelocationLine2 - Second address linecity - The city of the locationstateOrProvince - The state or province of the locationpostalCode - The postalCode for the locationcountry - The country for the locationpersist - True is this location should be persisted, false if this location should be returned as an in-memory only (used when creating a new Organization)
public static Location loadLocation(Context context,
java.lang.String locationName,
java.lang.String locationLine1,
java.lang.String city,
java.lang.String postalCode,
java.lang.String stateOrProvince,
java.lang.String country)
context - Valid SDK ContextlocationName - Name of the locationlocationLine1 - First address linecity - The city of the locationpostalCode - The postalCode for the locationstateOrProvince - The state or province of the locationcountry - The country for the location
public static Organization createNewOrganization(Context context,
java.lang.String name,
Location location)
context - Valid SDK Contextname - The Organization namelocation - A in-Memory non-persisted Location
public static Organization loadOrganization(Context context,
java.lang.String name)
context - Valid SDK Contextname - The organization name, cannot be null
public static DataValue findCurrentDataItemValue(Context context,
Device device,
java.lang.String dataItemName)
context - Valid SDK Contextdevice - Valid Device (must have been loaded from DB)dataItemName - Name of a DataItem which exists for the given Device
public static DataValueList findHistoricalDataItemValue(Context context,
Device device,
java.lang.String dataItemName)
context - Valid SDK Contextdevice - Valid Device (must have been loaded from DB)dataItemName - Name of a DataItem which exists for the given Device
public static DataItem loadDataItem(Context context,
Model model,
java.lang.String dataItemName)
context - Valid SDK Contextmodel - A persisted Model from the DBdataItemName - The name of the Data Item to load from the DB
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||