com.nonesole.persistence.file.catalog
Class Catalog

java.lang.Object
  extended by com.nonesole.persistence.file.catalog.Catalog
All Implemented Interfaces:
ICatalog

public class Catalog
extends java.lang.Object
implements ICatalog

Control Catalog

Version:
1.0 - build in 2009-07-21
Author:
JACK LEE

Constructor Summary
Catalog(java.lang.String fileName)
          Construction
 
Method Summary
 void bind(CatalogEntry ce)
          Bind CatalogEntry
 void destroy()
          Destroy current object
 long getCircleTime()
          Circle time(ms)
 java.lang.String getFolderPath()
          Get folder path
 boolean hasNext()
          Whether or not exist next object
 boolean isSynchronization()
          Saving data is whether or not synchronization.
 CatalogEntry lookup(java.lang.String id)
          Search CatalogEntry by id
 CatalogEntry next()
          Get next CatalogEntry object
 void rebind(CatalogEntry ce)
          Rebind CatalogEntry
 void rewind()
          Reset all of internal variables
 ICatalog setCircleTime(long circleTime)
          Set circle time(ms)
 ICatalog setSynchronization(boolean isSynchronization)
          Set synchronization.
 void unbind(CatalogEntry ce)
          Unbind CatalogEntry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Catalog

public Catalog(java.lang.String fileName)
        throws OperationsException
Construction

Parameters:
fileName -
Throws:
OperationsException
Method Detail

bind

public void bind(CatalogEntry ce)
          throws OperationsException
Description copied from interface: ICatalog
Bind CatalogEntry

Specified by:
bind in interface ICatalog
Parameters:
ce - - CatalogEntry object
Throws:
OperationsException

rebind

public void rebind(CatalogEntry ce)
            throws OperationsException
Description copied from interface: ICatalog
Rebind CatalogEntry

Specified by:
rebind in interface ICatalog
Parameters:
ce - - CatalogEntry object
Throws:
OperationsException

unbind

public void unbind(CatalogEntry ce)
            throws OperationsException
Description copied from interface: ICatalog
Unbind CatalogEntry

Specified by:
unbind in interface ICatalog
Parameters:
ce - - CatalogEntry object
Throws:
OperationsException

lookup

public CatalogEntry lookup(java.lang.String id)
Description copied from interface: ICatalog
Search CatalogEntry by id

Specified by:
lookup in interface ICatalog
Returns:
CatalogEntry

destroy

public void destroy()
             throws java.lang.InterruptedException
Description copied from interface: ICatalog
Destroy current object

Specified by:
destroy in interface ICatalog
Throws:
java.lang.InterruptedException

isSynchronization

public boolean isSynchronization()
Description copied from interface: ICatalog
Saving data is whether or not synchronization.

Specified by:
isSynchronization in interface ICatalog
Returns:
true - synchronization

setSynchronization

public ICatalog setSynchronization(boolean isSynchronization)
Description copied from interface: ICatalog
Set synchronization.

Specified by:
setSynchronization in interface ICatalog
Parameters:
isSynchronization - - true: synchronization

getCircleTime

public long getCircleTime()
Description copied from interface: ICatalog
Circle time(ms)

Specified by:
getCircleTime in interface ICatalog
Returns:
the circleTime

setCircleTime

public ICatalog setCircleTime(long circleTime)
Description copied from interface: ICatalog
Set circle time(ms)

Specified by:
setCircleTime in interface ICatalog

hasNext

public boolean hasNext()
Description copied from interface: ICatalog
Whether or not exist next object

Specified by:
hasNext in interface ICatalog
Returns:
true - there is one object next

next

public CatalogEntry next()
Description copied from interface: ICatalog
Get next CatalogEntry object

Specified by:
next in interface ICatalog
Returns:
CatalogEntry

rewind

public void rewind()
Description copied from interface: ICatalog
Reset all of internal variables

Specified by:
rewind in interface ICatalog

getFolderPath

public java.lang.String getFolderPath()
Description copied from interface: ICatalog
Get folder path

Specified by:
getFolderPath in interface ICatalog