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>
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
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
Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.MarshalRecord
org.eclipse.persistence.internal.oxm.record.MarshalRecord.CycleDetectionStack<E>
Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
org.eclipse.persistence.internal.oxm.record.XMLRecord.Nil
-
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
Fields inherited from class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl
equalNamespaceResolvers, hasCustomNamespaceMapper, marshaller, namespaceAware, namespaceResolver, session
Fields inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
DEFAULT_ATTRIBUTE_GROUP, NIL
-
Constructor Summary
ConstructorDescriptionJsonBuilderRecord
(jakarta.json.JsonArrayBuilder jsonArrayBuilder) JsonBuilderRecord
(jakarta.json.JsonObjectBuilder jsonObjectBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addValueToArray
(JsonBuilderRecord.Level level, Object value, QName schemaType) protected void
addValueToObject
(JsonBuilderRecord.Level level, String keyName, Object value, QName schemaType) protected JsonBuilderRecord.Level
createNewLevel
(boolean collection, JsonBuilderRecord.Level parentLevel, boolean nestedArray) void
This method is used to inform the MarshalRecord that it is done receiving element events that are part of a collection.protected void
protected void
setComplex
(JsonBuilderRecord.Level level, boolean complex) protected void
protected void
protected void
writeEmptyCollection
(JsonBuilderRecord.Level level, 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
Methods inherited from interface org.eclipse.persistence.internal.oxm.record.MarshalRecord
attributeWithoutQName, hasCustomNamespaceMapper, isXOPPackage, removeExtraNamespacesFromNamespaceResolver, setLeafElementType
Methods inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
getConversionManager, getSession
-
Constructor Details
-
JsonBuilderRecord
public JsonBuilderRecord() -
JsonBuilderRecord
public JsonBuilderRecord(jakarta.json.JsonObjectBuilder jsonObjectBuilder) -
JsonBuilderRecord
public JsonBuilderRecord(jakarta.json.JsonArrayBuilder jsonArrayBuilder)
-
-
Method Details
-
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:
-
setComplex
- Overrides:
setComplex
in classJsonRecord<JsonBuilderRecord.Level>
-
writeEmptyCollection
- Specified by:
writeEmptyCollection
in classJsonRecord<JsonBuilderRecord.Level>
-
addValueToObject
protected void addValueToObject(JsonBuilderRecord.Level level, String keyName, Object value, QName schemaType) - Specified by:
addValueToObject
in classJsonRecord<JsonBuilderRecord.Level>
-
addValueToArray
- Specified by:
addValueToArray
in classJsonRecord<JsonBuilderRecord.Level>
-