org.apache.commons.scaffold.util
Interface Storable

All Known Subinterfaces:
StorageBean
All Known Implementing Classes:
ScrollerBeanBase, StorageBeanBase

public interface Storable

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

Version:
$Revision: 155464 $ $Date: 2005-02-26 13:26:54 +0000 (Sat, 26 Feb 2005) $
Author:
Ted Husted

Method Summary
 void allocateKey()
          Obtain a new primary key for this object.
 void delete()
          Permenantly delete record.
 Object getResult()
          Return the result object of an operation.
 int getResultCode()
          Return the result code from an operation.
 Object getStorageKey()
          Return this object's primary key.
 void populate(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(Object result)
          Cache the result object of an operation.
 void setResultCode(int resultCode)
          Set a result code for an operation.
 void setStorageKey(Object key)
          Set this object's primary key.
 void store()
          Commit record to storage.
 

Method Detail

store

void store()
           throws Exception
Commit record to storage.

Throws:
Exception

retrieve

void retrieve()
              throws Exception
Retrieve record from storage.

Throws:
Exception

delete

void delete()
            throws Exception
Permenantly delete record.

Throws:
Exception

recycle

void recycle()
             throws Exception
Mark entry for deletion.

Throws:
Exception

restore

void restore()
             throws Exception
Unmark entry for deletion.

Throws:
Exception

getStorageKey

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


setStorageKey

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


allocateKey

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

Throws:
Exception

setResult

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


getResult

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


setResultCode

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


getResultCode

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


populate

void populate(Map parameters)
              throws Exception
Populate this object from a Map.

Throws:
Exception


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.