net.sourceforge.floggy.persistence.migration
Interface Enumeration


public interface Enumeration

A Enumeration to be used in the updating process. A instance of this interface will iterate over a collection of registers that must be migrated from old layout of fields to a new layout.

Since:
1.3.0
Author:
Thiago Moreira

Method Summary
 int delete()
          Delete the current record.
 int getSize()
          Gets the size of the enumeration.
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 Hashtable nextElement()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
 int update(Persistable persistable)
          Update the current record with the Persistable parameter.
 

Method Detail

delete

int delete()
           throws FloggyException
Delete the current record.

Returns:
the recordId where the persistable object was deleted from.
Throws:
FloggyException

getSize

int getSize()
Gets the size of the enumeration.

Returns:
the size

hasMoreElements

boolean hasMoreElements()
Tests if this enumeration contains more elements.

Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

Hashtable nextElement()
                      throws FloggyException
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Returns:
the next element of this enumeration.
Throws:
FloggyException - if no more elements exist.

update

int update(Persistable persistable)
           throws FloggyException
Update the current record with the Persistable parameter.

Parameters:
persistable - The persistable object that will update the current record.
Returns:
the recordId where the persistable object is stored
Throws:
FloggyException


Copyright © 2006-2011 Floggy Open Source Group. All Rights Reserved.