|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 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.AbstractDirectMapping org.eclipse.persistence.oxm.mappings.XMLDirectMapping org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping
public class XMLBinaryDataMapping
Purpose:Provide a mapping for binary data that can be treated as either inline or as an attachment.
Responsibilities:
XMLBinaryDataMapping represents a mapping 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 typed 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 FormField Summary |
---|
Fields inherited from class org.eclipse.persistence.oxm.mappings.XMLDirectMapping |
---|
EMPTY_STRING, isCDATA |
Fields inherited from class org.eclipse.persistence.mappings.foundation.AbstractDirectMapping |
---|
attributeClassification, attributeClassificationName, attributeObjectClassification, converter, converterClassName, field, isMutable, nullValue |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, descriptor, fields, isLazy, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_1 |
Constructor Summary | |
---|---|
XMLBinaryDataMapping()
|
Method Summary | |
---|---|
java.lang.String |
getMimeType()
INTERNAL |
java.lang.String |
getMimeType(java.lang.Object anObject)
INTERNAL |
MimeTypePolicy |
getMimeTypePolicy()
|
boolean |
isAbstractDirectMapping()
INTERNAL: |
boolean |
isSwaRef()
|
void |
setMimeType(java.lang.String mimeTypeString)
Force mapping to set default FixedMimeTypePolicy using the MimeType string as argument |
void |
setMimeTypePolicy(MimeTypePolicy aPolicy)
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.sessions.AbstractSession executionSession)
INTERNAL: Return the mapping's attribute value from the row. |
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Get a value from the object and set that in the respective field of the row. |
void |
writeSingleValue(java.lang.Object attributeValue,
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.XMLDirectMapping |
---|
getAttributeValue, getFieldValue, getNullPolicy, getXPath, initialize, isCDATA, isXMLMapping, setAttributeValueInObject, setIsCDATA, setNullPolicy, writeValueIntoRow |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMLBinaryDataMapping()
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 aPolicy)
aPolicy
- MimeTypePolicypublic void setMimeType(java.lang.String mimeTypeString)
mimeTypeString
- public boolean isSwaRef()
public void setSwaRef(boolean swaRef)
public void setXPath(java.lang.String xpathString)
setXPath
in class XMLDirectMapping
xpathString
- Stringpublic void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLDirectMapping
writeFromObjectIntoRow
in class XMLDirectMapping
public void writeSingleValue(java.lang.Object attributeValue, java.lang.Object parent, XMLRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
XMLMapping
writeSingleValue
in interface XMLMapping
writeSingleValue
in class XMLDirectMapping
attributeValue
- - 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.sessions.AbstractSession executionSession)
XMLDirectMapping
valueFromRow
in class XMLDirectMapping
public boolean isAbstractDirectMapping()
AbstractDirectMapping
isAbstractDirectMapping
in class AbstractDirectMapping
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |