SMILA (incubation) API documentation

org.eclipse.smila.objectstore
Interface StoreObject

All Known Implementing Classes:
SimpleObjectInfo

public interface StoreObject

Information about objects in a store of an ObjectStoreService. This defines only the basic parts of an ObjectInfo that is common to all services. Implementations may choose to extend it add more specific information.


Field Summary
static java.lang.String KEY_ID
          key of object ID in the AnyMap representation of the ObjectInfo.
static java.lang.String KEY_SIZE
          key of size in the AnyMap representation of the ObjectInfo.
static java.lang.String KEY_TIMESTAMP
          key of timestamp in the AnyMap representation of the ObjectInfo.
 
Method Summary
 java.lang.String getId()
           
 long getSize()
           
 java.util.Date getTimestamp()
           
 AnyMap toAny()
          Create an AnyMap with the contents of this StoreObject.
 

Field Detail

KEY_ID

static final java.lang.String KEY_ID
key of object ID in the AnyMap representation of the ObjectInfo.

See Also:
Constant Field Values

KEY_SIZE

static final java.lang.String KEY_SIZE
key of size in the AnyMap representation of the ObjectInfo.

See Also:
Constant Field Values

KEY_TIMESTAMP

static final java.lang.String KEY_TIMESTAMP
key of timestamp in the AnyMap representation of the ObjectInfo.

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
Returns:
ID of object.

getSize

long getSize()
Returns:
size of object in bytes.

getTimestamp

java.util.Date getTimestamp()
Returns:
timestamp of last modification of object.

toAny

AnyMap toAny()
Create an AnyMap with the contents of this StoreObject. In JSON, it should look like this:
 {
   "id" : "name-of-object",
   "size" : 42,
   "timestamp" : "2011-06-20T09:22:42.123+0100"
 }
 
Service implementations that extend the ObjectInfo should still use this structure as a base and add specific information as they like.

Returns:

SMILA (incubation) API documentation