org.granite.hibernate.jmf
Class AbstractPersistentCollectionCodec<H extends PersistentCollection>

java.lang.Object
  extended by org.granite.hibernate.jmf.AbstractPersistentCollectionCodec<H>
All Implemented Interfaces:
ExtendedObjectCodec
Direct Known Subclasses:
PersistentBagCodec, PersistentListCodec, PersistentMapCodec, PersistentSetCodec, PersistentSortedMapCodec, PersistentSortedSetCodec

public abstract class AbstractPersistentCollectionCodec<H extends PersistentCollection>
extends Object
implements ExtendedObjectCodec

Author:
Franck WOLFF

Field Summary
protected  String clientCollectionClassName
           
protected  Class<H> hibernateCollectionClass
           
 
Constructor Summary
AbstractPersistentCollectionCodec(Class<H> hibernateCollectionClass)
           
 
Method Summary
 boolean canDecode(ExtendedObjectInput in, String className)
           
 boolean canEncode(ExtendedObjectOutput out, Object v)
           
 void decode(ExtendedObjectInput in, Object v)
           
 void encode(ExtendedObjectOutput out, Object v)
           
 String getDecodedClassName(ExtendedObjectInput in, String className)
           
 String getEncodedClassName(ExtendedObjectOutput out, Object v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.granite.messaging.jmf.codec.ExtendedObjectCodec
newInstance
 

Field Detail

hibernateCollectionClass

protected final Class<H extends PersistentCollection> hibernateCollectionClass

clientCollectionClassName

protected final String clientCollectionClassName
Constructor Detail

AbstractPersistentCollectionCodec

public AbstractPersistentCollectionCodec(Class<H> hibernateCollectionClass)
Method Detail

canEncode

public boolean canEncode(ExtendedObjectOutput out,
                         Object v)
Specified by:
canEncode in interface ExtendedObjectCodec

getEncodedClassName

public String getEncodedClassName(ExtendedObjectOutput out,
                                  Object v)
Specified by:
getEncodedClassName in interface ExtendedObjectCodec

encode

public void encode(ExtendedObjectOutput out,
                   Object v)
            throws IOException,
                   IllegalAccessException
Specified by:
encode in interface ExtendedObjectCodec
Throws:
IOException
IllegalAccessException

canDecode

public boolean canDecode(ExtendedObjectInput in,
                         String className)
Specified by:
canDecode in interface ExtendedObjectCodec

getDecodedClassName

public String getDecodedClassName(ExtendedObjectInput in,
                                  String className)
Specified by:
getDecodedClassName in interface ExtendedObjectCodec

decode

public void decode(ExtendedObjectInput in,
                   Object v)
            throws IOException,
                   ClassNotFoundException,
                   IllegalAccessException
Specified by:
decode in interface ExtendedObjectCodec
Throws:
IOException
ClassNotFoundException
IllegalAccessException