org.mmbase.storage
Interface Storable

All Known Implementing Classes:
CoreField

public interface Storable

This interface contains functionality for retrieving a storage identifier - a name or id suitable for storing the object. It also holds status information (i.e. whether a field is in Storage or not) and storage-specific data.

Since:
MMBase-1.7
Version:
$Id: Storable.java,v 1.6 2005/06/28 14:01:41 pierre Exp $
Author:
Pierre van Rooden

Method Summary
 Object getStorageIdentifier()
          Returns a storage identifier for this object.
 int getStorageType()
          Retrieves the storage type.
 boolean inStorage()
          Returns whether an object is (or, for a new object, should be) defined in the storage.
 void setStorageType(int value)
          Sets the storage type.
 

Method Detail

getStorageIdentifier

public Object getStorageIdentifier()
                            throws StorageException
Returns a storage identifier for this object. This should return: A Storable object (except for MMObjectNode) should retrieve its storage identifier using StorageManagerFactory.getStorageIdentifier() when it is first instantiated.

Returns:
the identifier
Throws:
StorageException

inStorage

public boolean inStorage()
Returns whether an object is (or, for a new object, should be) defined in the storage. Virtual fields or builders should return false.

Returns:
true if the object is kept in the storage

getStorageType

public int getStorageType()
Retrieves the storage type. The meaning of this type is dependent on the storage implementation.


setStorageType

public void setStorageType(int value)
Sets the storage type. This method is called by the storage layer when first loading a builder. The meaning of this type is dependent on the storage implementation.

Parameters:
value - the value to set


MMBase build 1.8.1.20060716