public class OAJacksonDeserializerLoader extends Object
This supports object graphs, json from POJOs that might not have matching pkey properties.
For POJOs without direct pkey & fkey properties, it uses the following to find and update matching OAObjects
Modifier and Type | Class and Description |
---|---|
protected static class |
OAJacksonDeserializerLoader.EqualQueryForObject |
protected static class |
OAJacksonDeserializerLoader.EqualQueryForReference |
protected static class |
OAJacksonDeserializerLoader.RetryPojoReference |
Constructor and Description |
---|
OAJacksonDeserializerLoader(OAJson oaj) |
Modifier and Type | Method and Description |
---|---|
protected void |
_findExistingObject(OAJson.StackItem stackItem) |
protected void |
_findExistingObjectFromPojo(OAJson.StackItem stackItem) |
protected Object |
convert(com.fasterxml.jackson.databind.JsonNode jn,
OAPropertyInfo pi) |
protected void |
createObject(OAJson.StackItem stackItem) |
protected void |
debug(OAJson.StackItem si,
boolean bShowObj,
String msg) |
void |
debug(OAJson.StackItem si,
String msg) |
protected void |
debug2(OAJson.StackItem si,
String msg) |
void |
findExistingObject(OAJson.StackItem stackItem) |
boolean |
getDebug() |
protected OAJacksonDeserializerLoader.EqualQueryForObject |
getEqualQueryForObject(OAJson.StackItem stackItem) |
protected OAJacksonDeserializerLoader.EqualQueryForReference |
getEqualQueryForReference(OAJson.StackItem stackItem,
PojoLinkUnique plu) |
List<OAJacksonDeserializerLoader.RetryPojoReference> |
getRetryPojoReferences()
List of references that were not found.
|
<T extends OAObject> |
load(com.fasterxml.jackson.databind.JsonNode node,
T root) |
<T extends OAObject> |
load(com.fasterxml.jackson.databind.JsonNode node,
T root,
Class<T> clazz)
Main method called by OAJacksonModule to load an OAObject and any references from json tree.
|
protected boolean |
load(OAJson.StackItem stackItem)
Main method for loading JsonObject into a (new or existing) OAObject.
Recursively will load all link objects. |
protected void |
loadObject(OAJson.StackItem stackItem) |
protected boolean |
loadObjectIdProperties(OAJson.StackItem stackItem) |
protected void |
loadObjectManyLink(OAJson.StackItem stackItem,
OALinkInfo li) |
protected void |
loadObjectNonPojoReferences(OAJson.StackItem stackItem,
Set<OALinkInfo> hsLinkInfoOneLoaded) |
protected boolean |
loadObjectOneLink(OAJson.StackItem stackItem,
OAJson.StackItem stackItemChild) |
protected boolean |
loadObjectOneLink(OAJson.StackItem stackItem,
OALinkInfo li) |
protected boolean |
loadObjectPojoFkeyReferences(OAJson.StackItem stackItem,
PojoLinkOne plo,
OALinkInfo li) |
protected boolean |
loadObjectPojoImportMatchReferences(OAJson.StackItem stackItem,
PojoLinkOne plo,
OALinkInfo li) |
protected void |
loadObjectPojoReferences(OAJson.StackItem stackItem,
Set<OALinkInfo> hsLinkInfoOneLoaded) |
protected boolean |
loadObjectPojoUniqueReferences(OAJson.StackItem stackItem,
PojoLinkOne plo,
OALinkInfo li) |
protected void |
loadObjectProperties(OAJson.StackItem stackItem) |
protected void |
loadObjectReferences(OAJson.StackItem stackItem,
Set<OALinkInfo> hsLinkInfoOneLoaded) |
protected void |
retryPojoReferences() |
void |
setDebug(boolean b) |
public OAJacksonDeserializerLoader(OAJson oaj)
public <T extends OAObject> T load(com.fasterxml.jackson.databind.JsonNode node, T root)
public <T extends OAObject> T load(com.fasterxml.jackson.databind.JsonNode node, T root, Class<T> clazz)
protected boolean load(OAJson.StackItem stackItem)
find or create a matching OAObject from an JsonObject.
This will first use the stack, then guid, pkeys, importMatches, linkWithUnique, linkWithEqualAndUnique.
protected void createObject(OAJson.StackItem stackItem)
protected boolean loadObjectIdProperties(OAJson.StackItem stackItem)
protected void loadObject(OAJson.StackItem stackItem)
protected void loadObjectProperties(OAJson.StackItem stackItem)
protected boolean loadObjectOneLink(OAJson.StackItem stackItem, OALinkInfo li)
protected boolean loadObjectOneLink(OAJson.StackItem stackItem, OAJson.StackItem stackItemChild)
protected void loadObjectManyLink(OAJson.StackItem stackItem, OALinkInfo li)
protected void loadObjectReferences(OAJson.StackItem stackItem, Set<OALinkInfo> hsLinkInfoOneLoaded)
protected void loadObjectNonPojoReferences(OAJson.StackItem stackItem, Set<OALinkInfo> hsLinkInfoOneLoaded)
protected void loadObjectPojoReferences(OAJson.StackItem stackItem, Set<OALinkInfo> hsLinkInfoOneLoaded)
protected boolean loadObjectPojoFkeyReferences(OAJson.StackItem stackItem, PojoLinkOne plo, OALinkInfo li)
protected boolean loadObjectPojoImportMatchReferences(OAJson.StackItem stackItem, PojoLinkOne plo, OALinkInfo li)
protected boolean loadObjectPojoUniqueReferences(OAJson.StackItem stackItem, PojoLinkOne plo, OALinkInfo li)
public void findExistingObject(OAJson.StackItem stackItem)
protected void _findExistingObject(OAJson.StackItem stackItem)
protected void _findExistingObjectFromPojo(OAJson.StackItem stackItem)
protected Object convert(com.fasterxml.jackson.databind.JsonNode jn, OAPropertyInfo pi)
protected OAJacksonDeserializerLoader.EqualQueryForObject getEqualQueryForObject(OAJson.StackItem stackItem)
protected OAJacksonDeserializerLoader.EqualQueryForReference getEqualQueryForReference(OAJson.StackItem stackItem, PojoLinkUnique plu)
protected void retryPojoReferences()
public List<OAJacksonDeserializerLoader.RetryPojoReference> getRetryPojoReferences()
public void setDebug(boolean b)
public boolean getDebug()
public void debug(OAJson.StackItem si, String msg)
protected void debug2(OAJson.StackItem si, String msg)
protected void debug(OAJson.StackItem si, boolean bShowObj, String msg)
Copyright © 1999–2025 ViaOA. All rights reserved.