Class JsonBuilderRecord
- java.lang.Object
-
- org.eclipse.persistence.internal.core.sessions.CoreAbstractRecord
-
- org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,org.eclipse.persistence.internal.core.helper.CoreField,MARSHALLER,org.eclipse.persistence.internal.oxm.NamespaceResolver>
-
- org.eclipse.persistence.oxm.record.MarshalRecord<org.eclipse.persistence.internal.oxm.XMLMarshaller>
-
- org.eclipse.persistence.oxm.record.JsonRecord<JsonBuilderRecord.Level>
-
- org.eclipse.persistence.oxm.record.JsonBuilderRecord
-
- All Implemented Interfaces:
org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,org.eclipse.persistence.internal.core.helper.CoreField,org.eclipse.persistence.internal.oxm.XMLMarshaller,org.eclipse.persistence.internal.oxm.NamespaceResolver>
,org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,org.eclipse.persistence.internal.core.helper.CoreField,org.eclipse.persistence.internal.oxm.XMLMarshaller,org.eclipse.persistence.internal.oxm.NamespaceResolver>
,org.eclipse.persistence.internal.oxm.record.XMLRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession>
public class JsonBuilderRecord extends JsonRecord<JsonBuilderRecord.Level>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
JsonBuilderRecord.Level
Instances of this class are used to maintain state about the current level of the JSON message being marshalled.-
Nested classes/interfaces inherited from class org.eclipse.persistence.oxm.record.JsonRecord
JsonRecord.JsonRecordContentHandler
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.oxm.record.JsonRecord
attributePrefix, characterEscapeHandler, isLastEventStart, isRootArray, NULL, position
-
Fields inherited from class org.eclipse.persistence.oxm.record.MarshalRecord
COLON_W_SCHEMA_NIL_ATTRIBUTE, textWrapperFragment, TRUE
-
-
Constructor Summary
Constructors Constructor Description JsonBuilderRecord()
JsonBuilderRecord(javax.json.JsonArrayBuilder jsonArrayBuilder)
JsonBuilderRecord(javax.json.JsonObjectBuilder jsonObjectBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addValueToArray(JsonBuilderRecord.Level level, java.lang.Object value, javax.xml.namespace.QName schemaType)
protected void
addValueToObject(JsonBuilderRecord.Level level, java.lang.String keyName, java.lang.Object value, javax.xml.namespace.QName schemaType)
protected JsonBuilderRecord.Level
createNewLevel(boolean collection, JsonBuilderRecord.Level parentLevel, boolean nestedArray)
void
endCollection()
This method is used to inform the MarshalRecord that it is done receiving element events that are part of a collection.protected void
finishLevel()
protected void
setComplex(JsonBuilderRecord.Level level, boolean complex)
protected void
startRootLevelCollection()
protected void
startRootObject()
protected void
writeEmptyCollection(JsonBuilderRecord.Level level, java.lang.String keyName)
-
Methods inherited from class org.eclipse.persistence.oxm.record.JsonRecord
attribute, attribute, attribute, cdata, characters, characters, characters, closeStartElement, defaultNamespaceDeclaration, element, emptyAttribute, emptyCollection, emptyComplex, emptySimple, endDocument, endElement, forceValueWrapper, getKeyName, getNamespaceSeparator, getStringForQName, getTextWrapperFragment, isWrapperAsCollectionName, marshalWithoutRootElement, namespaceDeclaration, namespaceDeclarations, nilComplex, nilSimple, node, openStartElement, setMarshaller, startCollection, startDocument, startEmptyCollection, writeValue
-
Methods inherited from class org.eclipse.persistence.oxm.record.MarshalRecord
add, addGroupingElement, addPositionalNodes, afterContainmentMarshal, beforeContainmentMarshal, clear, closeStartGroupingElements, endPrefixMapping, endPrefixMappings, flush, getCurrentAttributeGroup, getCycleDetectionStack, getDocument, getDOM, getGroupingElements, getLocalName, getNameForFragment, getNamespaceURI, getPositionalNodes, getPrefixBytes, getPrefixForFragment, getValueToWrite, node, openStartGroupingElements, popAttributeGroup, predicateAttribute, processNamespaceResolverForXSIPrefix, pushAttributeGroup, put, removeGroupingElement, setGroupingElement, setSession, startPrefixMapping, startPrefixMappings, transformToXML, writeHeader
-
Methods inherited from class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl
addExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, attributeWithoutQName, getConversionManager, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, getSession, hasCustomNamespaceMapper, hasEqualNamespaceResolvers, isNamespaceAware, isXOPPackage, removeExtraNamespacesFromNamespaceResolver, resolveNamespacePrefix, setCustomNamespaceMapper, setEqualNamespaceResolvers, setLeafElementType, setLeafElementType, setNamespaceResolver, setOwningObject, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttribute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord
addExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, hasEqualNamespaceResolvers, isNamespaceAware, resolveNamespacePrefix, setCustomNamespaceMapper, setEqualNamespaceResolvers, setLeafElementType, setNamespaceResolver, setOwningObject, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttribute
-
-
-
-
Method Detail
-
createNewLevel
protected JsonBuilderRecord.Level createNewLevel(boolean collection, JsonBuilderRecord.Level parentLevel, boolean nestedArray)
- Overrides:
createNewLevel
in classJsonRecord<JsonBuilderRecord.Level>
-
startRootObject
protected void startRootObject()
- Overrides:
startRootObject
in classJsonRecord<JsonBuilderRecord.Level>
-
finishLevel
protected void finishLevel()
- Overrides:
finishLevel
in classJsonRecord<JsonBuilderRecord.Level>
-
startRootLevelCollection
protected void startRootLevelCollection()
- Specified by:
startRootLevelCollection
in classJsonRecord<JsonBuilderRecord.Level>
-
endCollection
public void endCollection()
Description copied from class:MarshalRecord
This method is used to inform the MarshalRecord that it is done receiving element events that are part of a collection.- Specified by:
endCollection
in interfaceorg.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,org.eclipse.persistence.internal.core.helper.CoreField,org.eclipse.persistence.internal.oxm.XMLMarshaller,org.eclipse.persistence.internal.oxm.NamespaceResolver>
- Overrides:
endCollection
in classMarshalRecord<org.eclipse.persistence.internal.oxm.XMLMarshaller>
- See Also:
MarshalRecord.startCollection()
-
setComplex
protected void setComplex(JsonBuilderRecord.Level level, boolean complex)
- Overrides:
setComplex
in classJsonRecord<JsonBuilderRecord.Level>
-
writeEmptyCollection
protected void writeEmptyCollection(JsonBuilderRecord.Level level, java.lang.String keyName)
- Specified by:
writeEmptyCollection
in classJsonRecord<JsonBuilderRecord.Level>
-
addValueToObject
protected void addValueToObject(JsonBuilderRecord.Level level, java.lang.String keyName, java.lang.Object value, javax.xml.namespace.QName schemaType)
- Specified by:
addValueToObject
in classJsonRecord<JsonBuilderRecord.Level>
-
addValueToArray
protected void addValueToArray(JsonBuilderRecord.Level level, java.lang.Object value, javax.xml.namespace.QName schemaType)
- Specified by:
addValueToArray
in classJsonRecord<JsonBuilderRecord.Level>
-
-