de.unikassel.android.sdcframework.persistence.facade
Class DatabaseSample

Package class diagram package DatabaseSample
java.lang.Object
  extended by de.unikassel.android.sdcframework.persistence.facade.DatabaseSample

public class DatabaseSample
extends Object

A sample adaption for database access.


Field Summary
 String data
          The device specific sensor data
 String dataTypeClassName
          The class name of the data type
 String deviceIdentifier
          the sample device identifier
 String location
          The serialized location information
 int priority
          the sample priority for transmission
 boolean synced
          the sample time stamp synchronization state.
 long timeStamp
          the sample time stamp
 
Constructor Summary
DatabaseSample()
          Constructor
DatabaseSample(Sample sample)
          Constructor
 
Method Summary
 Sample toSample()
          Does create a sample from this database sample
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deviceIdentifier

public String deviceIdentifier
the sample device identifier


timeStamp

public long timeStamp
the sample time stamp


priority

public int priority
the sample priority for transmission


synced

public boolean synced
the sample time stamp synchronization state.


data

public String data
The device specific sensor data


location

public String location
The serialized location information


dataTypeClassName

public String dataTypeClassName
The class name of the data type

Constructor Detail

DatabaseSample

public DatabaseSample()
Constructor


DatabaseSample

public DatabaseSample(Sample sample)
               throws Exception
Constructor

Parameters:
sample - the sample to construct from
Throws:
Exception - in case of serialization error
Method Detail

toSample

public Sample toSample()
Does create a sample from this database sample

Returns:
a sample created from this database sample or null if creation fails