public class JsonArray extends JsonConstruct
JsonConstruct.ObjectBuilder| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList<java.lang.Object> |
elements
Array elements
|
private static ContextLocal<integer> |
endOfArray |
private static CentralLogger |
LOG
Logger.
|
| Constructor and Description |
|---|
JsonArray() |
__json_objectmodel_JsonConstruct_constructor__, __json_objectmodel_JsonConstruct_execute__, getJsonText, getJsonText, getJsonTextImpl, write, write, write, write, write, write, write, write, write, write, write, write, writeFile, writeFile, writeFile, writeImpl, writeStream, writeStream, writeStream__isValidInternal__, __lang_BaseObject_constructor__, __setValidInternal__, assertNotNull, assertNotNull, getLegacyClass, getNextSibling, getPrevSibling, legacyEquals, toLegacyStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisTrackedprivate static final CentralLogger LOG
private java.util.ArrayList<java.lang.Object> elements
private static ContextLocal<integer> endOfArray
public void __json_objectmodel_JsonArray_execute__()
public static void __json_objectmodel_JsonArray_constructor__static__()
public void __json_objectmodel_JsonArray_constructor__()
public void __json_objectmodel_JsonArray_constructor__(integer _sz)
public void __json_objectmodel_JsonArray_constructor__(character[] val)
public void __json_objectmodel_JsonArray_constructor__(comhandle[] _val)
public void __json_objectmodel_JsonArray_constructor__(date[] _val)
public void __json_objectmodel_JsonArray_constructor__(datetime[] _val)
public void __json_objectmodel_JsonArray_constructor__(datetimetz[] _val)
public void __json_objectmodel_JsonArray_constructor__(decimal[] _val)
public void __json_objectmodel_JsonArray_constructor__(handle[] _val)
public void __json_objectmodel_JsonArray_constructor__(int64[] _val)
public void __json_objectmodel_JsonArray_constructor__(integer[] _val)
public void __json_objectmodel_JsonArray_constructor__(logical[] _val)
public void __json_objectmodel_JsonArray_constructor__(longchar[] _val)
public void __json_objectmodel_JsonArray_constructor__(memptr[] _val)
public void __json_objectmodel_JsonArray_constructor__(raw[] _val)
public void __json_objectmodel_JsonArray_constructor__(recid[] _val)
public void __json_objectmodel_JsonArray_constructor__(rowid[] _val)
public void __json_objectmodel_JsonArray_constructor__(object<? extends JsonObject>[] _val)
public void __json_objectmodel_JsonArray_1_constructor__(object<? extends JsonArray>[] _val)
public void __json_objectmodel_JsonArray_destructor__()
public static integer getEndOfArray()
public integer getLength()
public void setLength(int64 _var)
public integer add(datetimetz _val)
public integer add_2(object<? extends JsonObject> _val)
public integer add(datetimetz[] _val)
public integer add_4(object<? extends JsonObject>[] _val)
public integer add(integer _idx, datetimetz _val)
public integer add(integer _idx, datetimetz[] _val)
public integer add_1(integer _idx, object<? extends JsonObject> _val)
public integer add_1(integer _idx, object<? extends JsonObject>[] _val)
public integer addNull()
public object<? extends _BaseObject_> legacyClone()
BaseObjectlegacyClone in interface _BaseObject_legacyClone in class BaseObjectpublic datetimetz getDatetimeTz(integer _idx)
public datetimetz[] getDatetimeTz(integer _idx, integer _count)
public object<? extends JsonObject> getJsonObject(integer _idx)
public object<? extends JsonObject>[] getJsonObject(integer _idx, integer _count)
public longchar getJsonText()
public logical set(integer _idx, datetimetz _val)
public logical set_1(integer _idx, object<? extends JsonObject> _val)
public void addElement(java.lang.String name,
object<? extends JsonConstruct> value)
addElement in class JsonConstructname - Name of the json element. This parameter is ignored if this is a json array.value - Value of the json element.public void addElement(java.lang.String name,
java.lang.String value)
addElement in class JsonConstructname - Name of the json element. This parameter is ignored if this is a json array.value - Value of the json element.public void addElement(java.lang.String name,
java.lang.Number value)
addElement in class JsonConstructname - Name of the json element. This parameter is ignored if this is a json array.value - Value of the json element.public void addElement(java.lang.String name,
java.lang.Boolean value)
addElement in class JsonConstructname - Name of the json element. This parameter is ignored if this is a json array.value - Value of the json element.public void addElementNull(java.lang.String name)
addElementNull in class JsonConstructname - Name of the json element. This parameter is ignored if this is a json array.public java.lang.Iterable<java.lang.Object> getElements()
protected void clear()
private void addElementsCtorImpl(BaseDataType[] elements)
elements - The values to use as the initial json elements.private void addElementsImpl(BaseDataType[] elements)
add legacy methods for adding multiple array elements to this instance.elements - The values to use as the initial json elements.private void addElementsImpl(integer idx, BaseDataType[] items)
add legacy methods for adding multiple array elements to this instance.idx - The 1-based array index where the element should be added.items - The values to use as the initial json elements.private int addElements(integer idx, BaseDataType[] items)
add legacy methods for adding multiple array elements to this instance.idx - The 1-based array index where the element should be added.items - The values to use as the initial json elements.private void addElementImpl(BaseDataType element)
add legacy methods for adding single element to this instance.element - The values to use as the initial json elements.private void addElementImpl(integer idx, BaseDataType element)
add legacy methods for adding single element to this instance.idx - The 1-based array index where the element should be added.element - The values to use as the initial json elements.private void setElementImpl(integer idx, BaseDataType element)
set legacy methods for adding single element to this instance.idx - The 1-based array index where the element should be added.element - The values to use as the initial json elements.private void addSetElementImpl(int idx,
BaseDataType element,
boolean add)
add and set legacy methods for adding single element to this instance.idx - The 1-based array index where the element should be added.element - The values to use as the initial json elements.add - If set to true the method will implement semantics of add legacy methods. If
false the method will implement semantics of the set legacy methods.private void addSetElementImpl(int idx,
java.lang.Object element,
boolean add)
add and set legacy methods for adding single element to this instance.idx - The 1-based array index where the element should be added.element - The values to use as the initial json elements.add - If set to true the method will implement semantics of add legacy methods. If
false the method will implement semantics of the set legacy methods.private void addElement(java.lang.Object value)
null. It is up to the
caller to supply the correct type.value - The value to add.private void getElementImpl(integer idx, java.lang.String method, int type, java.util.function.Function<java.lang.Object,BaseDataType> converter, java.util.function.Supplier<BaseDataType> nullSupplier)
get legacy methods.idx - The 1-based index of the json array element to retrieve.method - The actual 'get' method name, used for error message.type - The expected JSON type.converter - The function that will convert the stored Java element instance to a legacy instance.nullSupplier - When the stored element is null this supplier will be used to retrieve the
corresponding legacy value.private void getElementsImpl(integer idx, integer count, java.lang.String method, int type, java.util.function.Function<java.lang.Object,BaseDataType> converter, java.util.function.Supplier<BaseDataType> nullSupplier)
get legacy methods.idx - The 1-based index of the json array element to retrieve.count - The number of array elements to retrieve.converter - The function that will convert the stored Java element instance to a legacy instance.nullSupplier - When the stored element is null this supplier will be used to retrieve the
corresponding legacy value.protected void throwStreamNotFound(java.lang.String streamName)
JsonConstructthrowStreamNotFound in class JsonConstructstreamName - The stream name.