com.jalios.jstore
Class Swizzler

java.lang.Object
  extended by com.jalios.jstore.Swizzler

public class Swizzler
extends Object

This class manages the id <-> storable maps.

Version:
$Revision: 27753 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Method Summary
 void decRC(Storable storable)
          Decrements the Reference Counter of the storable
 Storable getStorable(String id)
           
 void incRC(Storable storable)
          Increments the Reference Counter of the storable
 boolean isReferrenced(Storable storable)
           
 boolean isSwizzled(Storable storable)
           
 boolean isSwizzled(String id)
           
 Iterator<Storable> iterator()
          Return an iterator on the storable set
 void registerStorable(Storable storable, Map<String,String> attributes)
          Swizzler ID <==> Storable
 void removeStorable(Storable storable)
           
 void swizzle(Map<String,String> attributes)
          Replace in the Map the storables by their ID storable -> ID
 void updateArrayOfReferences(Storable[] array, Storable[] updatedArray)
           
 void updateReferences(Storable storable, Storable updated)
          Updates the references of a storable and its update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Method Detail

registerStorable

public void registerStorable(Storable storable,
                             Map<String,String> attributes)
Swizzler ID <==> Storable


removeStorable

public void removeStorable(Storable storable)

updateReferences

public void updateReferences(Storable storable,
                             Storable updated)
                      throws IOException
Updates the references of a storable and its update

Parameters:
storable - the old referenced storable
updated - the updated storable
Throws:
IOException

updateArrayOfReferences

public void updateArrayOfReferences(Storable[] array,
                                    Storable[] updatedArray)
                             throws IOException
Throws:
IOException

getStorable

public Storable getStorable(String id)

isSwizzled

public boolean isSwizzled(Storable storable)

isSwizzled

public boolean isSwizzled(String id)

iterator

public Iterator<Storable> iterator()
Return an iterator on the storable set

Returns:
the storable iterator.

swizzle

public void swizzle(Map<String,String> attributes)
Replace in the Map the storables by their ID storable -> ID


incRC

public void incRC(Storable storable)
Increments the Reference Counter of the storable

Parameters:
storable - the target storable

decRC

public void decRC(Storable storable)
Decrements the Reference Counter of the storable

Parameters:
storable - the target storable

isReferrenced

public boolean isReferrenced(Storable storable)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.