|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.mappings.DatabaseMapping org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping org.eclipse.persistence.oxm.mappings.XMLBinaryDataCollectionMapping
public class XMLBinaryDataCollectionMapping
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
XMLAttachmentMarshaller
,
XMLAttachmentUnmarshaller
,
MimeTypePolicy
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
DatabaseMapping.WriteType |
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping |
---|
reuseContainer |
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping |
---|
elementDataTypeName, field, valueConverter |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM |
Fields inherited from interface org.eclipse.persistence.internal.oxm.XMLContainerMapping |
---|
EMPTY_CONTAINER_DEFAULT |
Constructor Summary | |
---|---|
XMLBinaryDataCollectionMapping()
|
Method Summary | |
---|---|
java.lang.Class |
getAttributeElementClass()
PUBLIC: Return the class each element in the object's collection should be converted to, before the collection is inserted into the object. |
java.lang.Class |
getCollectionContentType()
|
java.lang.String |
getMimeType()
INTERNAL |
java.lang.String |
getMimeType(java.lang.Object anObject)
INTERNAL |
MimeTypePolicy |
getMimeTypePolicy()
|
java.lang.Object |
getValueToWrite(java.lang.Object value,
java.lang.Object parent,
XMLRecord record,
XMLField field,
XMLField includeField,
org.eclipse.persistence.internal.sessions.AbstractSession session)
|
boolean |
isAbstractCompositeDirectCollectionMapping()
INTERNAL: |
boolean |
isSwaRef()
|
void |
setAttributeElementClass(java.lang.Class attributeElementClass)
PUBLIC: Set the class each element in the object's collection should be converted to, before the collection is inserted into the object. |
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()
|
java.lang.Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
INTERNAL: Build the nested collection from the database row. |
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session,
DatabaseMapping.WriteType writeType)
INTERNAL: |
void |
writeSingleValue(java.lang.Object value,
java.lang.Object parent,
XMLRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: A method that marshals a single value to the provided Record based on this mapping's XPath. |
Methods inherited from class org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping |
---|
getNullPolicy, getReuseContainer, getWrapperNullPolicy, getXPath, initialize, isCDATA, isCollapsingStringValues, isDefaultEmptyContainer, isNormalizingStringValues, isWriteOnly, isXMLMapping, preInitialize, setAttributeValueInObject, setCollapsingStringValues, setDefaultEmptyContainer, setIsCDATA, setIsWriteOnly, setNormalizingStringValues, setNullPolicy, setReuseContainer, setWrapperNullPolicy, useCollectionClassName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.persistence.oxm.mappings.XMLMapping |
---|
convertClassNamesToClasses |
Methods inherited from interface org.eclipse.persistence.mappings.structures.ArrayCollectionMapping |
---|
getAttributeName, setRealAttributeValueInObject |
Constructor Detail |
---|
public XMLBinaryDataCollectionMapping()
Method Detail |
---|
public boolean shouldInlineBinaryData()
public void setShouldInlineBinaryData(boolean b)
public java.lang.String getMimeType(java.lang.Object anObject)
public java.lang.String getMimeType()
public MimeTypePolicy getMimeTypePolicy()
public void setMimeTypePolicy(MimeTypePolicy mimeTypePolicy)
aPolicy
- MimeTypePolicypublic void setMimeType(java.lang.String mimeTypeString)
mimeTypeString
- public boolean isSwaRef()
public void setSwaRef(boolean swaRef)
public boolean isAbstractCompositeDirectCollectionMapping()
AbstractCompositeDirectCollectionMapping
isAbstractCompositeDirectCollectionMapping
in class AbstractCompositeDirectCollectionMapping
public void setXPath(java.lang.String xpathString)
setXPath
in class XMLCompositeDirectCollectionMapping
xpathString
- Stringpublic void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
XMLCompositeDirectCollectionMapping
writeFromObjectIntoRow
in class XMLCompositeDirectCollectionMapping
public java.lang.Object getValueToWrite(java.lang.Object value, java.lang.Object parent, XMLRecord record, XMLField field, XMLField includeField, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void writeSingleValue(java.lang.Object value, java.lang.Object parent, XMLRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLMapping
writeSingleValue
in interface XMLMapping
writeSingleValue
in class XMLCompositeDirectCollectionMapping
value
- - The value to be marshalledrecord
- - The Record the value is being marshalled too.public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed)
XMLCompositeDirectCollectionMapping
valueFromRow
in class XMLCompositeDirectCollectionMapping
public void setCollectionContentType(java.lang.Class javaClass)
public java.lang.Class getCollectionContentType()
public void setAttributeElementClass(java.lang.Class attributeElementClass)
setAttributeElementClass
in class AbstractCompositeDirectCollectionMapping
public java.lang.Class getAttributeElementClass()
AbstractCompositeDirectCollectionMapping
getAttributeElementClass
in class AbstractCompositeDirectCollectionMapping
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |