|
| 1 | +package com.genexus.webpanels.gridstate ; |
| 2 | +import com.genexus.GXBaseCollection; |
| 3 | +import com.genexus.GXutil; |
| 4 | +import com.genexus.ModelContext; |
| 5 | +import com.genexus.xml.*; |
| 6 | +import java.util.*; |
| 7 | +import com.genexus.diagnostics.core.ILogger; |
| 8 | +import com.genexus.diagnostics.core.LogManager; |
| 9 | + |
| 10 | +public final class SdtGridState extends GXXMLSerializable implements Cloneable, java.io.Serializable { |
| 11 | + public static final ILogger logger = LogManager.getLogger(SdtGridState.class); |
| 12 | + |
| 13 | + public SdtGridState() { |
| 14 | + this(new ModelContext(SdtGridState.class)); |
| 15 | + } |
| 16 | + |
| 17 | + public SdtGridState(ModelContext context) { |
| 18 | + super(context, "SdtGridState"); |
| 19 | + } |
| 20 | + |
| 21 | + public SdtGridState(int remoteHandle, ModelContext context) { |
| 22 | + super(remoteHandle, context, "SdtGridState"); |
| 23 | + } |
| 24 | + |
| 25 | + public SdtGridState(StructSdtGridState struct) { |
| 26 | + this(); |
| 27 | + setStruct(struct); |
| 28 | + } |
| 29 | + |
| 30 | + private static java.util.HashMap mapper = new java.util.HashMap(); |
| 31 | + |
| 32 | + static { |
| 33 | + } |
| 34 | + |
| 35 | + public String getJsonMap(String value) { |
| 36 | + return (String) mapper.get(value); |
| 37 | + } |
| 38 | + |
| 39 | + public short readxml(com.genexus.xml.XMLReader oReader, |
| 40 | + String sName) { |
| 41 | + short GXSoapError = 1; |
| 42 | + formatError = false; |
| 43 | + sTagName = oReader.getName(); |
| 44 | + if (oReader.getIsSimple() == 0) { |
| 45 | + GXSoapError = oReader.read(); |
| 46 | + nOutParmCount = (short) (0); |
| 47 | + while (((GXutil.strcmp(oReader.getName(), sTagName) != 0) || (oReader.getNodeType() == 1)) && (GXSoapError > 0)) { |
| 48 | + readOk = (short) (0); |
| 49 | + if (GXutil.strcmp2(oReader.getLocalName(), "CurrentPage")) { |
| 50 | + gxTv_SdtGridState_Currentpage = (int) (getnumericvalue(oReader)); |
| 51 | + readOk = (short) (1); |
| 52 | + GXSoapError = oReader.read(); |
| 53 | + } |
| 54 | + if (GXutil.strcmp2(oReader.getLocalName(), "OrderedBy")) { |
| 55 | + gxTv_SdtGridState_Orderedby = (short) (getnumericvalue(oReader)); |
| 56 | + if (GXSoapError > 0) { |
| 57 | + readOk = (short) (1); |
| 58 | + } |
| 59 | + GXSoapError = oReader.read(); |
| 60 | + } |
| 61 | + if (GXutil.strcmp2(oReader.getLocalName(), "InputValues")) { |
| 62 | + if (gxTv_SdtGridState_Inputvalues == null) { |
| 63 | + gxTv_SdtGridState_Inputvalues = new GXBaseCollection<SdtGridState_InputValuesItem>(SdtGridState_InputValuesItem.class, "GridState.InputValuesItem", "GeneXus", remoteHandle); |
| 64 | + } |
| 65 | + if (oReader.getIsSimple() == 0) { |
| 66 | + GXSoapError = gxTv_SdtGridState_Inputvalues.readxmlcollection(oReader, "InputValues", "InputValuesItem"); |
| 67 | + } |
| 68 | + if (GXSoapError > 0) { |
| 69 | + readOk = (short) (1); |
| 70 | + } |
| 71 | + if (GXutil.strcmp2(oReader.getLocalName(), "InputValues")) { |
| 72 | + GXSoapError = oReader.read(); |
| 73 | + } |
| 74 | + } |
| 75 | + nOutParmCount = (short) (nOutParmCount + 1); |
| 76 | + if ((readOk == 0) || formatError) { |
| 77 | + context.globals.sSOAPErrMsg = context.globals.sSOAPErrMsg + "Error reading " + sTagName + GXutil.newLine(); |
| 78 | + context.globals.sSOAPErrMsg = context.globals.sSOAPErrMsg + "Message: " + oReader.readRawXML(); |
| 79 | + GXSoapError = (short) (nOutParmCount * -1); |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + return GXSoapError; |
| 84 | + } |
| 85 | + |
| 86 | + public void writexml(com.genexus.xml.XMLWriter oWriter, |
| 87 | + String sName, |
| 88 | + String sNameSpace) { |
| 89 | + writexml(oWriter, sName, sNameSpace, true); |
| 90 | + } |
| 91 | + |
| 92 | + public void writexml(com.genexus.xml.XMLWriter oWriter, |
| 93 | + String sName, |
| 94 | + String sNameSpace, |
| 95 | + boolean sIncludeState) { |
| 96 | + if ((GXutil.strcmp("", sName) == 0)) { |
| 97 | + sName = "GridState"; |
| 98 | + } |
| 99 | + if ((GXutil.strcmp("", sNameSpace) == 0)) { |
| 100 | + sNameSpace = "GeneXus"; |
| 101 | + } |
| 102 | + oWriter.writeStartElement(sName); |
| 103 | + if (GXutil.strcmp(GXutil.left(sNameSpace, 10), "[*:nosend]") != 0) { |
| 104 | + oWriter.writeAttribute("xmlns", sNameSpace); |
| 105 | + } else { |
| 106 | + sNameSpace = GXutil.right(sNameSpace, GXutil.len(sNameSpace) - 10); |
| 107 | + } |
| 108 | + oWriter.writeElement("CurrentPage", GXutil.trim(GXutil.str(gxTv_SdtGridState_Currentpage, 5, 0))); |
| 109 | + if (GXutil.strcmp(sNameSpace, "GeneXus") != 0) { |
| 110 | + oWriter.writeAttribute("xmlns", "GeneXus"); |
| 111 | + } |
| 112 | + oWriter.writeElement("OrderedBy", GXutil.trim(GXutil.str(gxTv_SdtGridState_Orderedby, 4, 0))); |
| 113 | + if (GXutil.strcmp(sNameSpace, "GeneXus") != 0) { |
| 114 | + oWriter.writeAttribute("xmlns", "GeneXus"); |
| 115 | + } |
| 116 | + if (gxTv_SdtGridState_Inputvalues != null) { |
| 117 | + String sNameSpace1; |
| 118 | + if (GXutil.strcmp(sNameSpace, "GeneXus") == 0) { |
| 119 | + sNameSpace1 = "[*:nosend]" + "GeneXus"; |
| 120 | + } else { |
| 121 | + sNameSpace1 = "GeneXus"; |
| 122 | + } |
| 123 | + gxTv_SdtGridState_Inputvalues.writexmlcollection(oWriter, "InputValues", sNameSpace1, "InputValuesItem", sNameSpace1); |
| 124 | + } |
| 125 | + oWriter.writeEndElement(); |
| 126 | + } |
| 127 | + |
| 128 | + public long getnumericvalue(com.genexus.xml.XMLReader oReader) { |
| 129 | + if (GXutil.notNumeric(oReader.getValue())) { |
| 130 | + formatError = true; |
| 131 | + } |
| 132 | + return GXutil.lval(oReader.getValue()); |
| 133 | + } |
| 134 | + |
| 135 | + public void tojson() { |
| 136 | + tojson(true); |
| 137 | + } |
| 138 | + |
| 139 | + public void tojson(boolean includeState) { |
| 140 | + tojson(includeState, true); |
| 141 | + } |
| 142 | + |
| 143 | + public void tojson(boolean includeState, |
| 144 | + boolean includeNonInitialized) { |
| 145 | + AddObjectProperty("CurrentPage", gxTv_SdtGridState_Currentpage, false, false); |
| 146 | + AddObjectProperty("OrderedBy", gxTv_SdtGridState_Orderedby, false, false); |
| 147 | + if (gxTv_SdtGridState_Inputvalues != null) { |
| 148 | + AddObjectProperty("InputValues", gxTv_SdtGridState_Inputvalues, false, false); |
| 149 | + } |
| 150 | + } |
| 151 | + |
| 152 | + public int getgxTv_SdtGridState_Currentpage() { |
| 153 | + return gxTv_SdtGridState_Currentpage; |
| 154 | + } |
| 155 | + |
| 156 | + public void setgxTv_SdtGridState_Currentpage(int value) { |
| 157 | + gxTv_SdtGridState_Currentpage = value; |
| 158 | + } |
| 159 | + |
| 160 | + public short getgxTv_SdtGridState_Orderedby() { |
| 161 | + return gxTv_SdtGridState_Orderedby; |
| 162 | + } |
| 163 | + |
| 164 | + public void setgxTv_SdtGridState_Orderedby(short value) { |
| 165 | + gxTv_SdtGridState_Orderedby = value; |
| 166 | + } |
| 167 | + |
| 168 | + public GXBaseCollection<SdtGridState_InputValuesItem> getgxTv_SdtGridState_Inputvalues() { |
| 169 | + if (gxTv_SdtGridState_Inputvalues == null) { |
| 170 | + gxTv_SdtGridState_Inputvalues = new GXBaseCollection<SdtGridState_InputValuesItem>(SdtGridState_InputValuesItem.class, "GridState.InputValuesItem", "GeneXus", remoteHandle); |
| 171 | + } |
| 172 | + gxTv_SdtGridState_Inputvalues_N = (byte) (0); |
| 173 | + return gxTv_SdtGridState_Inputvalues; |
| 174 | + } |
| 175 | + |
| 176 | + public void setgxTv_SdtGridState_Inputvalues(GXBaseCollection<SdtGridState_InputValuesItem> value) { |
| 177 | + gxTv_SdtGridState_Inputvalues_N = (byte) (0); |
| 178 | + gxTv_SdtGridState_Inputvalues = value; |
| 179 | + } |
| 180 | + |
| 181 | + public void setgxTv_SdtGridState_Inputvalues_SetNull() { |
| 182 | + gxTv_SdtGridState_Inputvalues_N = (byte) (1); |
| 183 | + gxTv_SdtGridState_Inputvalues = null; |
| 184 | + } |
| 185 | + |
| 186 | + public boolean getgxTv_SdtGridState_Inputvalues_IsNull() { |
| 187 | + return (gxTv_SdtGridState_Inputvalues == null); |
| 188 | + } |
| 189 | + |
| 190 | + public byte getgxTv_SdtGridState_Inputvalues_N() { |
| 191 | + return gxTv_SdtGridState_Inputvalues_N; |
| 192 | + } |
| 193 | + |
| 194 | + public void initialize(int remoteHandle) { |
| 195 | + initialize(); |
| 196 | + } |
| 197 | + |
| 198 | + public void initialize() { |
| 199 | + gxTv_SdtGridState_Inputvalues_N = (byte) (1); |
| 200 | + sTagName = ""; |
| 201 | + } |
| 202 | + |
| 203 | + public SdtGridState Clone() { |
| 204 | + return (SdtGridState) (clone()); |
| 205 | + } |
| 206 | + |
| 207 | + public void setStruct(StructSdtGridState struct) { |
| 208 | + setgxTv_SdtGridState_Currentpage(struct.getCurrentpage()); |
| 209 | + setgxTv_SdtGridState_Orderedby(struct.getOrderedby()); |
| 210 | + GXBaseCollection<SdtGridState_InputValuesItem> gxTv_SdtGridState_Inputvalues_aux = new GXBaseCollection<SdtGridState_InputValuesItem>(SdtGridState_InputValuesItem.class, "GridState.InputValuesItem", "GeneXus", remoteHandle); |
| 211 | + Vector<StructSdtGridState_InputValuesItem> gxTv_SdtGridState_Inputvalues_aux1 = struct.getInputvalues(); |
| 212 | + if (gxTv_SdtGridState_Inputvalues_aux1 != null) { |
| 213 | + for (int i = 0; i < gxTv_SdtGridState_Inputvalues_aux1.size(); i++) { |
| 214 | + gxTv_SdtGridState_Inputvalues_aux.add(new SdtGridState_InputValuesItem(gxTv_SdtGridState_Inputvalues_aux1.elementAt(i))); |
| 215 | + } |
| 216 | + } |
| 217 | + setgxTv_SdtGridState_Inputvalues(gxTv_SdtGridState_Inputvalues_aux); |
| 218 | + } |
| 219 | + |
| 220 | + public StructSdtGridState getStruct() { |
| 221 | + StructSdtGridState struct = new StructSdtGridState(); |
| 222 | + struct.setCurrentpage(getgxTv_SdtGridState_Currentpage()); |
| 223 | + struct.setOrderedby(getgxTv_SdtGridState_Orderedby()); |
| 224 | + struct.setInputvalues(getgxTv_SdtGridState_Inputvalues().getStruct()); |
| 225 | + return struct; |
| 226 | + } |
| 227 | + |
| 228 | + protected byte gxTv_SdtGridState_Inputvalues_N; |
| 229 | + protected short gxTv_SdtGridState_Orderedby; |
| 230 | + protected short readOk; |
| 231 | + protected short nOutParmCount; |
| 232 | + protected int gxTv_SdtGridState_Currentpage; |
| 233 | + protected String sTagName; |
| 234 | + protected boolean formatError; |
| 235 | + protected GXBaseCollection<SdtGridState_InputValuesItem> gxTv_SdtGridState_Inputvalues_aux; |
| 236 | + protected GXBaseCollection<SdtGridState_InputValuesItem> gxTv_SdtGridState_Inputvalues = null; |
| 237 | +} |
| 238 | + |
0 commit comments