org.apache.commons.scaffold.util
Interface Storable

All Known Subinterfaces:
StorageBean
All Known Implementing Classes:
StorageBeanBase

public interface Storable

Simple interface to describe public methods on a data access object.

Version:
$Revision: 1.4 $ $Date: 2004/03/21 21:10:10 $

Method Summary
 void allocateKey()
          Obtain a new primary key for this object.
 void delete()
          Permenantly delete record.
 java.lang.Object getResult()
          Return the result object of an operation.
 int getResultCode()
          Return the result code from an operation.
 java.lang.Object getStorageKey()
          Return this object's primary key.
 void populate(java.util.Map parameters)
          Populate this object from a Map.
 void recycle()
          Mark entry for deletion.
 void restore()
          Unmark entry for deletion.
 void retrieve()
          Retrieve record from storage.
 void setResult(java.lang.Object result)
          Cache the result object of an operation.
 void setResultCode(int resultCode)
          Set a result code for an operation.
 void setStorageKey(java.lang.Object key)
          Set this object's primary key.
 void store()
          Commit record to storage.
 

Method Detail

store

public void store()
           throws java.lang.Exception
Commit record to storage.

Throws:
java.lang.Exception

retrieve

public void retrieve()
              throws java.lang.Exception
Retrieve record from storage.

Throws:
java.lang.Exception

delete

public void delete()
            throws java.lang.Exception
Permenantly delete record.

Throws:
java.lang.Exception

recycle

public void recycle()
             throws java.lang.Exception
Mark entry for deletion.

Throws:
java.lang.Exception

restore

public void restore()
             throws java.lang.Exception
Unmark entry for deletion.

Throws:
java.lang.Exception

getStorageKey

public java.lang.Object getStorageKey()
Return this object's primary key.


setStorageKey

public void setStorageKey(java.lang.Object key)
Set this object's primary key.


allocateKey

public void allocateKey()
                 throws java.lang.Exception
Obtain a new primary key for this object.

Throws:
java.lang.Exception

setResult

public void setResult(java.lang.Object result)
Cache the result object of an operation.


getResult

public java.lang.Object getResult()
Return the result object of an operation.


setResultCode

public void setResultCode(int resultCode)
Set a result code for an operation.


getResultCode

public int getResultCode()
Return the result code from an operation.


populate

public void populate(java.util.Map parameters)
              throws java.lang.Exception
Populate this object from a Map.

Throws:
java.lang.Exception


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.