Package io.ebeaninternal.api.json
Interface SpiJsonWriter
-
- All Superinterfaces:
JsonWriter
- All Known Implementing Classes:
WriteJson
public interface SpiJsonWriter extends JsonWriter
Internal API extensions for JSON writing of Bean properties.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
beginAssocMany(String name)
Start a Many.void
beginAssocManyMap(String name, boolean elementCollection)
Start a Many.void
beginAssocOne(String name, EntityBean bean)
Start an assoc one path.void
endAssocMany()
End a Many.void
endAssocManyMap(boolean elementCollection)
End a Many.void
endAssocOne()
End an assoc one path.void
flush()
Flush the buffer.Boolean
includeMany(String name)
Return true if the many property should be included.boolean
isParentBean(Object value)
Return true if the value is a parent bean.void
popParentBeanMany()
Pop the parent of a ToMany.void
pushParentBeanMany(EntityBean bean)
Push the parent bean of a ToMany.void
toJson(String name, Collection<?> collection)
Write the collection.<T> void
writeBean(BeanDescriptor<T> desc, EntityBean bean)
Write the bean properties.void
writeValueUsingObjectMapper(String name, Object value)
Write value using underlying Jaskson object mapper if available.-
Methods inherited from interface io.ebean.text.json.JsonWriter
gen, isIncludeEmpty, isIncludeNull, writeBinary, writeBinaryField, writeBoolean, writeBooleanField, writeEndArray, writeEndObject, writeFieldName, writeNull, writeNullField, writeNumber, writeNumber, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeRaw, writeRawValue, writeStartArray, writeStartArray, writeStartObject, writeStartObject, writeString, writeStringField
-
-
-
-
Method Detail
-
flush
void flush() throws IOException
Flush the buffer.- Throws:
IOException
-
isParentBean
boolean isParentBean(Object value)
Return true if the value is a parent bean.
-
beginAssocOne
void beginAssocOne(String name, EntityBean bean)
Start an assoc one path.
-
endAssocOne
void endAssocOne()
End an assoc one path.
-
includeMany
Boolean includeMany(String name)
Return true if the many property should be included.
-
pushParentBeanMany
void pushParentBeanMany(EntityBean bean)
Push the parent bean of a ToMany.
-
popParentBeanMany
void popParentBeanMany()
Pop the parent of a ToMany.
-
toJson
void toJson(String name, Collection<?> collection)
Write the collection.
-
beginAssocMany
void beginAssocMany(String name)
Start a Many.
-
endAssocMany
void endAssocMany()
End a Many.
-
beginAssocManyMap
void beginAssocManyMap(String name, boolean elementCollection)
Start a Many.
-
endAssocManyMap
void endAssocManyMap(boolean elementCollection)
End a Many.
-
writeValueUsingObjectMapper
void writeValueUsingObjectMapper(String name, Object value)
Write value using underlying Jaskson object mapper if available.
-
writeBean
<T> void writeBean(BeanDescriptor<T> desc, EntityBean bean)
Write the bean properties.
-
-