Skip navigation links

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

E28847-01


oracle.eclipselink.coherence.integrated.cache
Interface Wrapper

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
WrapperInternal
All Known Implementing Classes:
SerializableWrapper

public interface Wrapper
extends java.io.Serializable

Purpose: This class will act as a wrapper for any Entity stored within Coherence. This interface will provide a means to store relationship information without forcing related objects to be referenced within Coherence. All Entities stored within Coherence will be wrapped by an implementation of this interface. Users who access Coherence via custom Value Extractors will need to anticipate unwrapping the actual entity. This does not apply to the default Coherence Reflection Extractor as the wrapper implementation will include mapped property methods. If users have not mapped all of the properties that they wish to access then they must implement a custom Value Extractor that unwraps the entity.

Since:
Oracle TopLink 11g (11.1.1.0.0)
Author:
gyorke

Method Summary
 java.lang.Object[] getForeignKeyValuesFor(java.lang.String propertyName)
          This method provides access to the foreign key values for the related entities.
 java.lang.Object[] getPrimaryKeyValuesFor(java.lang.String propertyName)
          This method provides access to the primary key values for the related entities.
 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 setPrimaryKeyValuesFor(java.lang.String propertyName, java.lang.Object[] pks)
          This method provides access to the primary key values for the related entities.
 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.

 

Method Detail

unwrap

java.lang.Object unwrap()
This method provides an access point for the wrapped entity. This method should be used by custom Value Extractors.

wrap

void wrap(java.lang.Object entity)
This method is used to store the Entity within the wrapper.

getForeignKeyValuesFor

java.lang.Object[] getForeignKeyValuesFor(java.lang.String propertyName)
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.

getPrimaryKeyValuesFor

java.lang.Object[] getPrimaryKeyValuesFor(java.lang.String propertyName)
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.

setForeignKeyValuesFor

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. 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.

setPrimaryKeyValuesFor

void setPrimaryKeyValuesFor(java.lang.String propertyName,
                            java.lang.Object[] pks)
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.

Skip navigation links

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