public interface OdinRowWriter
Modifier and Type | Method and Description |
---|---|
OdinRowWriter |
add(java.lang.Object o)
Write an object, if object is not a primitive or an
Object , the type definition is added before the object. |
OdinRowWriter |
addBoolean(boolean value)
Add a boolean to the row
|
OdinRowWriter |
addByte(byte value)
Add a byte to the row
|
OdinRowWriter |
addChar(char value)
Add a char to the row
|
OdinRowWriter |
addDouble(double value)
Add a double to the row
|
OdinRowWriter |
addFloat(float value)
Add a float to the row
|
OdinRowWriter |
addInt(int value)
Add a int to the row
|
OdinRowWriter |
addLong(long value)
Add a long to the row
|
OdinRowWriter |
addShort(short value)
Add a short to the row
|
OdinRowWriter |
addString(java.lang.String value)
Add a String to the row
|
OdinRowWriter |
addSubContent(IOConsumer<OdinWriter> subWriter)
Use a consumer to write content to a sub object.
|
OdinRowWriter |
addTyped(java.lang.Object o,
java.lang.reflect.Type type)
Write an object, odin get the
AnyType associated to the given type, if the object class is not the same than type class, like implementation,
the type definition is added before the object.Custom type can be created to add generic argument ( can be useful for collection ) by using TypeBuilder . |
<T> OdinRowWriter |
addTyped(T o,
AnyType<T> type)
Write an object, if the object class is not the same than type class, like implementation, the type definition is added before the object.
This method take a odin type to be use inside adapter by using ObjectType.getField(String) or all other field getter and
TypeField.getType() |
OdinRowWriter addBoolean(boolean value) throws java.io.IOException
value
- boolean to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addByte(byte value) throws java.io.IOException
value
- byte to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addShort(short value) throws java.io.IOException
value
- short to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addInt(int value) throws java.io.IOException
value
- int to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addLong(long value) throws java.io.IOException
value
- long to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addFloat(float value) throws java.io.IOException
value
- float to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addDouble(double value) throws java.io.IOException
value
- double to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addChar(char value) throws java.io.IOException
value
- char to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter addString(java.lang.String value) throws java.io.IOException
value
- String to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinRowWriter add(java.lang.Object o) throws java.io.IOException
Object
, the type definition is added before the object.o
- object to writeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinTypeException
- if the type adapter can not be build for this object.
Sub object type error is placed as cause of a OdinAdapterException
OdinAdapterException
- if a runtime exception is throw by an adapter when writing the object<T> OdinRowWriter addTyped(T o, AnyType<T> type) throws java.io.IOException
ObjectType.getField(String)
or all other field getter and
TypeField.getType()
T
- object generic typeo
- object to writetype
- object generic typeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinTypeException
- if the type adapter can not be build for this object.
Sub object type error is placed as cause of a OdinAdapterException
OdinAdapterException
- if a runtime exception is throw by an adapter when writing the objectOdinRowWriter addTyped(java.lang.Object o, java.lang.reflect.Type type) throws java.io.IOException
AnyType
associated to the given type, if the object class is not the same than type class, like implementation,
the type definition is added before the object.TypeBuilder
.o
- object to writetype
- object typeOdinRowWriter
instancejava.io.IOException
- if an IO exception occurOdinTypeException
- if the type adapter can not be build for this object.
Sub object type error is placed as cause of a OdinAdapterException
OdinAdapterException
- if a runtime exception is throw by an adapter when writing the objectOdinRowWriter addSubContent(IOConsumer<OdinWriter> subWriter) throws java.io.IOException
subWriter
- the sub writer consumerOdinRowWriter
instancejava.io.IOException
- if an IO exception occur