Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


oracle.eclipselink.coherence.integrated.internal.cache
Class SerializableWrapper

java.lang.Object
  extended by oracle.eclipselink.coherence.integrated.internal.cache.SerializableWrapper

All Implemented Interfaces:
java.io.Serializable, Wrapper, WrapperInternal

public class SerializableWrapper
extends java.lang.Object
implements WrapperInternal

Purpose: This class is used as a generic wrapper class for non POF serialization. It provides for serialization to a node which may not have the correct dynamic wrapper defined which would otherwise result in an exception.

Since:
Oracle TopLink 11g (11.1.1.0.0)
Author:
gyorke
See Also:
Serialized Form

Field Summary
protected  java.lang.Object delegate
           
protected  java.util.Map<java.lang.String,java.lang.Object[]> relationships
           
protected  java.util.Map<java.lang.String,java.lang.Object[]> rows
           
protected  boolean shouldMerge
           
protected  java.lang.String wrapperClassName
           

 

Constructor Summary
SerializableWrapper()
           

 

Method Summary
 java.util.Map getForeignKeys()
           
 java.lang.Object[] getForeignKeyValuesFor(java.lang.String propertyName)
          This method provides access to the foreign key values for the related entities.
 java.util.Map getPrimaryKeys()
           
 java.lang.Object[] getPrimaryKeyValuesFor(java.lang.String propertyName)
          This method provides access to the primary key values for the related entities.
 java.lang.String getWrapperClassName()
           
 void setForeignKeys(java.util.Map foreignKeys)
           
 void setForeignKeyValuesFor(java.lang.String propertyName, java.lang.Object[] fks)
          This method provides access to the foreign key values for queries of the related entities.
 void setPrimaryKeys(java.util.Map primaryKeys)
           
 void setPrimaryKeyValuesFor(java.lang.String propertyName, java.lang.Object[] pks)
          This method provides access to the primary key values for the related entities.
 void setShouldMerge(boolean shouldMerge)
           
 void setWrapperClassName(java.lang.String wrapperClassName)
           
 boolean shouldMerge()
          This method indicates whether Wrapper stored into cache should be merged into the database.
 java.lang.Object unwrap()
          This method provides an access point for the wrapped entity.
 void wrap(java.lang.Object entity)
          This method is used to store the Entity within the wrapper.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

delegate

protected java.lang.Object delegate

relationships

protected java.util.Map<java.lang.String,java.lang.Object[]> relationships

rows

protected java.util.Map<java.lang.String,java.lang.Object[]> rows

wrapperClassName

protected java.lang.String wrapperClassName

shouldMerge

protected boolean shouldMerge

Constructor Detail

SerializableWrapper

public SerializableWrapper()

Method Detail

getForeignKeys

public java.util.Map getForeignKeys()
Specified by:
getForeignKeys in interface WrapperInternal

getPrimaryKeys

public java.util.Map getPrimaryKeys()
Specified by:
getPrimaryKeys in interface WrapperInternal

setForeignKeys

public void setForeignKeys(java.util.Map foreignKeys)
Specified by:
setForeignKeys in interface WrapperInternal

setPrimaryKeys

public void setPrimaryKeys(java.util.Map primaryKeys)
Specified by:
setPrimaryKeys in interface WrapperInternal

wrap

public void wrap(java.lang.Object entity)
Description copied from interface: Wrapper
This method is used to store the Entity within the wrapper.
Specified by:
wrap in interface Wrapper
Specified by:
wrap in interface WrapperInternal

getForeignKeyValuesFor

public java.lang.Object[] getForeignKeyValuesFor(java.lang.String propertyName)
Description copied from interface: Wrapper
This method provides access to the foreign key values for the related entities. If users are accessing caches from a non EclipseLink client then this will provide the information to query for related entities. These values will exist for all relationships including non-owned relationships. This method returns an org.eclipse.persistence.sessions.Record where the contents are the FK values.
Specified by:
getForeignKeyValuesFor in interface Wrapper

getPrimaryKeyValuesFor

public java.lang.Object[] getPrimaryKeyValuesFor(java.lang.String propertyName)
Description copied from interface: Wrapper
This method provides access to the primary key values for the related entities. If users are accessing caches from a non EclipseLink client then this will provide the information to load related entities from other caches. These values will exist for all relationships including non-owned relationships. This method returns an Object[] where the contents of the nested array is the PK values in order of the EclipseLink Class Descriptor's PK mappings.
Specified by:
getPrimaryKeyValuesFor in interface Wrapper

setForeignKeyValuesFor

public void setForeignKeyValuesFor(java.lang.String propertyName,
                                   java.lang.Object[] fks)
Description copied from interface: Wrapper
This method provides access to the foreign key values for queries of the related entities. If users are accessing caches from a non EclipseLink client then this will provide the information to query related entities. These values will exist for all relationships including non-owned relationships. This method takes and Object[] of FK values in the order of the EclipseLink mappings.
Specified by:
setForeignKeyValuesFor in interface Wrapper

setPrimaryKeyValuesFor

public void setPrimaryKeyValuesFor(java.lang.String propertyName,
                                   java.lang.Object[] pks)
Description copied from interface: Wrapper
This method provides access to the primary key values for the related entities. If users are accessing caches from a non EclipseLink client then this will provide the information to store related entities PKs for caches. These values will exist for all relationships including non-owned relationships. This method takes an Object[] where the contents of the nested array is the PK values for an Entity.
Specified by:
setPrimaryKeyValuesFor in interface Wrapper

unwrap

public java.lang.Object unwrap()
Description copied from interface: Wrapper
This method provides an access point for the wrapped entity. This method should be used by custom Value Extractors.
Specified by:
unwrap in interface Wrapper

getWrapperClassName

public java.lang.String getWrapperClassName()
Specified by:
getWrapperClassName in interface WrapperInternal

setWrapperClassName

public void setWrapperClassName(java.lang.String wrapperClassName)
Specified by:
setWrapperClassName in interface WrapperInternal

shouldMerge

public boolean shouldMerge()
Description copied from interface: WrapperInternal
This method indicates whether Wrapper stored into cache should be merged into the database.
Specified by:
shouldMerge in interface WrapperInternal

setShouldMerge

public void setShouldMerge(boolean shouldMerge)
Specified by:
setShouldMerge in interface WrapperInternal

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.