public class OJSONFetchContext extends Object implements OFetchContext
Modifier and Type | Field and Description |
---|---|
protected Stack<ODocument> |
collectionStack |
protected OJSONWriter |
jsonWriter |
protected ORecordSerializerJSON.FormatSettings |
settings |
protected Stack<StringBuilder> |
typesStack |
Constructor and Description |
---|
OJSONFetchContext(OJSONWriter iJsonWriter,
ORecordSerializerJSON.FormatSettings iSettings) |
Modifier and Type | Method and Description |
---|---|
boolean |
fetchEmbeddedDocuments() |
int |
getIndentLevel() |
OJSONWriter |
getJsonWriter() |
boolean |
isInCollection(ODocument record) |
protected void |
manageTypes(String iFieldName,
Object iFieldValue,
OType fieldType) |
void |
onAfterArray(ODocument iRootRecord,
String iFieldName,
Object iUserObject) |
void |
onAfterCollection(ODocument iRootRecord,
String iFieldName,
Object iUserObject) |
void |
onAfterDocument(ODocument iRootRecord,
ODocument iDocument,
String iFieldName,
Object iUserObject) |
void |
onAfterFetch(ODocument iRootRecord) |
void |
onAfterMap(ODocument iRootRecord,
String iFieldName,
Object iUserObject) |
void |
onAfterStandardField(Object iFieldValue,
String iFieldName,
Object iUserObject,
OType fieldType) |
void |
onBeforeArray(ODocument iRootRecord,
String iFieldName,
Object iUserObject,
OIdentifiable[] iArray) |
void |
onBeforeCollection(ODocument iRootRecord,
String iFieldName,
Object iUserObject,
Iterable<?> iterable) |
void |
onBeforeDocument(ODocument iRootRecord,
ODocument iDocument,
String iFieldName,
Object iUserObject) |
void |
onBeforeFetch(ODocument iRootRecord) |
void |
onBeforeMap(ODocument iRootRecord,
String iFieldName,
Object iUserObject) |
void |
onBeforeStandardField(Object iFieldValue,
String iFieldName,
Object iUserObject,
OType fieldType) |
void |
writeLinkedAttribute(OIdentifiable iRecord,
String iFieldName) |
void |
writeLinkedValue(OIdentifiable iRecord,
String iFieldName) |
void |
writeSignature(OJSONWriter json,
ORecord record) |
protected final OJSONWriter jsonWriter
protected final ORecordSerializerJSON.FormatSettings settings
protected final Stack<StringBuilder> typesStack
public OJSONFetchContext(OJSONWriter iJsonWriter, ORecordSerializerJSON.FormatSettings iSettings)
public void onBeforeFetch(ODocument iRootRecord)
onBeforeFetch
in interface OFetchContext
public void onAfterFetch(ODocument iRootRecord)
onAfterFetch
in interface OFetchContext
public void onBeforeStandardField(Object iFieldValue, String iFieldName, Object iUserObject, OType fieldType)
onBeforeStandardField
in interface OFetchContext
public void onAfterStandardField(Object iFieldValue, String iFieldName, Object iUserObject, OType fieldType)
onAfterStandardField
in interface OFetchContext
public void onBeforeArray(ODocument iRootRecord, String iFieldName, Object iUserObject, OIdentifiable[] iArray)
onBeforeArray
in interface OFetchContext
public void onAfterArray(ODocument iRootRecord, String iFieldName, Object iUserObject)
onAfterArray
in interface OFetchContext
public void onBeforeCollection(ODocument iRootRecord, String iFieldName, Object iUserObject, Iterable<?> iterable)
onBeforeCollection
in interface OFetchContext
public void onAfterCollection(ODocument iRootRecord, String iFieldName, Object iUserObject)
onAfterCollection
in interface OFetchContext
public void onBeforeMap(ODocument iRootRecord, String iFieldName, Object iUserObject)
onBeforeMap
in interface OFetchContext
public void onAfterMap(ODocument iRootRecord, String iFieldName, Object iUserObject)
onAfterMap
in interface OFetchContext
public void onBeforeDocument(ODocument iRootRecord, ODocument iDocument, String iFieldName, Object iUserObject)
onBeforeDocument
in interface OFetchContext
public void onAfterDocument(ODocument iRootRecord, ODocument iDocument, String iFieldName, Object iUserObject)
onAfterDocument
in interface OFetchContext
public void writeLinkedValue(OIdentifiable iRecord, String iFieldName) throws IOException
IOException
public void writeLinkedAttribute(OIdentifiable iRecord, String iFieldName) throws IOException
IOException
public boolean isInCollection(ODocument record)
public OJSONWriter getJsonWriter()
public int getIndentLevel()
public void writeSignature(OJSONWriter json, ORecord record) throws IOException
IOException
public boolean fetchEmbeddedDocuments()
fetchEmbeddedDocuments
in interface OFetchContext
Copyright © 2009–2020 OrientDB. All rights reserved.