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

B32476-03

oracle.toplink.ox.mappings
Class XMLBinaryDataCollectionMapping

java.lang.Object
  extended by oracle.toplink.mappings.DatabaseMapping
      extended by oracle.toplink.mappings.foundation.AbstractCompositeDirectCollectionMapping
          extended by oracle.toplink.ox.mappings.XMLCompositeDirectCollectionMapping
              extended by oracle.toplink.ox.mappings.XMLBinaryDataCollectionMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ContainerMapping, oracle.toplink.ox.mappings.XMLMapping

public class XMLBinaryDataCollectionMapping
extends XMLCompositeDirectCollectionMapping

Purpose:Provide a mapping for a collection of binary data values that can be treated as either inline binary values or as an attachment.

Responsibilities:

XMLBinaryDataCollectionMapping represents a mapping of a collection of binary data in the object model to XML. This can either be written directly as inline binary data (base64) or passed through as an MTOM or SWAREF attachment.

The following types are allowable to be mapped using an XMLBinaryDataMapping:

Setting the XPath: TopLink XML mappings make use of XPath statements to find the relevant data in an XML document. The XPath statement is relative to the context node specified in the descriptor. The XPath may contain path and positional information; the last node in the XPath forms the local node for the binary mapping. The XPath is specified on the mapping using the setXPath method.

Inline Binary Data: Set this flag if you want to always inline binary data for this mapping. This will disable consideration for attachment handling for this mapping.

SwaRef: Set this flag in order to specify that the target node of this mapping is of type xs:swaref

Since:
TopLink 11.1.1.0.0g
See Also:
XMLAttachmentMarshaller, XMLAttachmentUnmarshaller, MimeTypePolicy, Serialized Form

Constructor Summary
XMLBinaryDataCollectionMapping()
           
 
Method Summary
 java.lang.Class getCollectionContentType()
           
 MimeTypePolicy getMimeTypePolicy()
           
 java.lang.Object getValueToWrite(java.lang.Object value, java.lang.Object parent, XMLRecord record, XMLField field, XMLField includeField, oracle.toplink.internal.sessions.AbstractSession session)
           
 boolean isSwaRef()
           
 void setCollectionContentType(java.lang.Class javaClass)
           
 void setMimeType(java.lang.String mimeTypeString)
          Force mapping to set default FixedMimeTypePolicy using the MimeType string as argument
 void setMimeTypePolicy(MimeTypePolicy mimeTypePolicy)
          Allow implementer to set the MimeTypePolicy class FixedMimeTypePolicy or AttributeMimeTypePolicy (dynamic)
 void setShouldInlineBinaryData(boolean b)
           
 void setSwaRef(boolean swaRef)
           
 void setXPath(java.lang.String xpathString)
          Set the Mapping field name attribute to the given XPath String
 boolean shouldInlineBinaryData()
           
 
Methods inherited from class oracle.toplink.ox.mappings.XMLCompositeDirectCollectionMapping
getXPath, isCDATA, setIsCDATA, useCollectionClassName
 
Methods inherited from class oracle.toplink.mappings.foundation.AbstractCompositeDirectCollectionMapping
getAttributeElementClass, getFieldElementClass, getFieldName, getValueConverter, hasValueConverter, setAttributeElementClass, setContainerPolicy, setField, setFieldElementClass, setUsesSingleNode, setValueConverter, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, useCollectionClass, useMapClass, usesSingleNode
 
Methods inherited from class oracle.toplink.mappings.DatabaseMapping
getAttributeAccessor, getAttributeClassification, getAttributeName, getGetMethodName, getProperty, getReferenceDescriptor, getSetMethodName, isLazy, isOptional, isUsingMethodAccess, readOnly, readWrite, setAttributeAccessor, setAttributeName, setGetMethodName, setIsLazy, setIsOptional, setIsReadOnly, setProperty, setSetMethodName, setWeight
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLBinaryDataCollectionMapping

public XMLBinaryDataCollectionMapping()
Method Detail

shouldInlineBinaryData

public boolean shouldInlineBinaryData()

setShouldInlineBinaryData

public void setShouldInlineBinaryData(boolean b)

getMimeTypePolicy

public MimeTypePolicy getMimeTypePolicy()

setMimeTypePolicy

public void setMimeTypePolicy(MimeTypePolicy mimeTypePolicy)
Allow implementer to set the MimeTypePolicy class FixedMimeTypePolicy or AttributeMimeTypePolicy (dynamic)

Parameters:
aPolicy - MimeTypePolicy

setMimeType

public void setMimeType(java.lang.String mimeTypeString)
Force mapping to set default FixedMimeTypePolicy using the MimeType string as argument

Parameters:
mimeTypeString -

isSwaRef

public boolean isSwaRef()

setSwaRef

public void setSwaRef(boolean swaRef)

setXPath

public void setXPath(java.lang.String xpathString)
Set the Mapping field name attribute to the given XPath String

Overrides:
setXPath in class XMLCompositeDirectCollectionMapping
Parameters:
xpathString - String

getValueToWrite

public java.lang.Object getValueToWrite(java.lang.Object value,
                                        java.lang.Object parent,
                                        XMLRecord record,
                                        XMLField field,
                                        XMLField includeField,
                                        oracle.toplink.internal.sessions.AbstractSession session)

setCollectionContentType

public void setCollectionContentType(java.lang.Class javaClass)

getCollectionContentType

public java.lang.Class getCollectionContentType()

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