public class HibernateExternalizer extends DefaultExternalizer
BYTES_0, constructors, dynamicClass, orderedFields, orderedSetterFields| Constructor and Description |
|---|
HibernateExternalizer() |
| Modifier and Type | Method and Description |
|---|---|
int |
accept(Class<?> clazz) |
void |
configure(XMap properties)
Configure this externalizer with the values supplied in granite-config.xml.
|
protected Serializable |
deserializeSerializable(byte[] data) |
protected String |
getProxyDetachedState(HibernateProxy proxy) |
protected boolean |
isEmbeddable(Class<?> clazz) |
protected boolean |
isRegularEntity(Class<?> clazz) |
protected AbstractExternalizablePersistentCollection |
newExternalizableCollection(org.hibernate.collection.spi.PersistentCollection value) |
protected org.hibernate.collection.spi.PersistentCollection |
newHibernateCollection(AbstractExternalizablePersistentCollection value,
Property field) |
Object |
newInstance(String type,
ObjectInput in) |
protected Object |
newProxyInstantiator(ConcurrentHashMap<String,ProxyFactory> proxyFactories,
String detachedState) |
void |
readExternal(Object o,
ObjectInput in) |
protected byte[] |
serializeSerializable(Serializable o) |
void |
writeExternal(Object o,
ObjectOutput out) |
findDefaultConstructor, findOrderedFields, findOrderedFields, isPropertyIgnored, isPropertyIgnored, isValueIgnoredpublic HibernateExternalizer()
public void configure(XMap properties)
The only supported configuration option is 'hibernate-collection-metadata' with values in ['no' (default), 'yes' and 'lazy']. By default, collection metadata (key, role and snapshot) aren't serialized. If the value of the 'hibernate-collection-metadata' node is 'yes', metadata will be always serialized, while the 'lazy' value tells the externalizer to serialiaze metadata for uninitialized collections only.
Configuration example (granite-config.xml):
<granite-config scan="true">
<externalizers>
<configuration>
<hibernate-collection-metadata>lazy</hibernate-collection-metadata>
</configuration>
</externalizers>
</granite-config>
configure in interface Externalizerconfigure in class DefaultExternalizerproperties - an XMap instance that contains the configuration node.public Object newInstance(String type, ObjectInput in) throws IOException, ClassNotFoundException, InstantiationException, InvocationTargetException, IllegalAccessException
newInstance in interface ExternalizernewInstance in class DefaultExternalizerIOExceptionClassNotFoundExceptionInstantiationExceptionInvocationTargetExceptionIllegalAccessExceptionprotected Object newProxyInstantiator(ConcurrentHashMap<String,ProxyFactory> proxyFactories, String detachedState)
public void readExternal(Object o, ObjectInput in) throws IOException, ClassNotFoundException, IllegalAccessException
readExternal in interface ExternalizerreadExternal in class DefaultExternalizerIOExceptionClassNotFoundExceptionIllegalAccessExceptionprotected org.hibernate.collection.spi.PersistentCollection newHibernateCollection(AbstractExternalizablePersistentCollection value, Property field)
public void writeExternal(Object o, ObjectOutput out) throws IOException, IllegalAccessException
writeExternal in interface ExternalizerwriteExternal in class DefaultExternalizerIOExceptionIllegalAccessExceptionprotected AbstractExternalizablePersistentCollection newExternalizableCollection(org.hibernate.collection.spi.PersistentCollection value)
public int accept(Class<?> clazz)
accept in interface Externalizeraccept in class DefaultExternalizerprotected String getProxyDetachedState(HibernateProxy proxy)
protected boolean isRegularEntity(Class<?> clazz)
protected boolean isEmbeddable(Class<?> clazz)
protected byte[] serializeSerializable(Serializable o)
protected Serializable deserializeSerializable(byte[] data)