Example #1
0
        /**
         * create a DBXValueType from a JArray
         * @param json JArray with the values to set into DBXValuesType
         * @return a DBXValueType
         */

        public static DBXValueType JSONToValueType(TJSONArray json)
        {
            DBXValueType vt = new DBXValueType();

            JSONToValueType(json, vt);
            return(vt);
        }
Example #2
0
        /**
         * create a DBXValueType from a JArray
         * @param json JArray with the values
         * @param vt the DBXValueType to set
         */
        public static void JSONToValueType(TJSONArray arr, DBXValueType vt)
        {
            JArray json = (JArray)arr.getInternalObject();

            vt.setName(json.Value <string>(0));
            vt.setDataType(json.Value <int>(1));
            vt.setOrdinal(json.Value <int>(2));
            vt.setSubType(json.Value <int>(3));
            vt.setScale(json.Value <int>(4));
            vt.setSize(json.Value <int>(5));
            vt.setPrecision(json.Value <int>(6));
            vt.setChildPosition(json.Value <int>(7));
            vt.setNullable(json.Value <bool>(8));
            vt.setHidden(json.Value <bool>(9));
            vt.setParameterDirection(json.Value <int>(10));
            vt.setValueParameter(json.Value <bool>(11));
            vt.setLiteral(json.Value <bool>(12));
        }
Example #3
0
        /**
         * @param DataType the DBXValueType to set into the JArray
         * @return a JArray with the value of DBXValueType
         */

        public static TJSONArray ValueTypeToJSON(DBXValueType DataType)
        {
            JArray Meta = new JArray();

            Meta.Add(DataType.getName());
            Meta.Add(DataType.getDataType());
            Meta.Add(DataType.getOrdinal());
            Meta.Add(DataType.getSubType());
            Meta.Add(DataType.getScale());
            Meta.Add(DataType.getSize());
            Meta.Add(DataType.getPrecision());
            Meta.Add(DataType.getChildPosition());
            Meta.Add(DataType.getNullable());
            Meta.Add(DataType.getHidden());
            Meta.Add(DataType.getParameterDirection());
            Meta.Add(DataType.getValueParameter());
            Meta.Add(DataType.getLiteral());
            return(new TJSONArray(Meta));
        }
Example #4
0
 /**
   	 * @param DataType the DBXValueType to set into the JArray
   	 * @return a JArray with the value of DBXValueType
   	 */
 public static TJSONArray ValueTypeToJSON(DBXValueType DataType)
 {
     JArray Meta = new JArray();
     Meta.Add(DataType.getName());
     Meta.Add(DataType.getDataType());
     Meta.Add(DataType.getOrdinal());
     Meta.Add(DataType.getSubType());
     Meta.Add(DataType.getScale());
     Meta.Add(DataType.getSize());
     Meta.Add(DataType.getPrecision());
     Meta.Add(DataType.getChildPosition());
     Meta.Add(DataType.getNullable());
     Meta.Add(DataType.getHidden());
     Meta.Add(DataType.getParameterDirection());
     Meta.Add(DataType.getValueParameter());
     Meta.Add(DataType.getLiteral());
     return new TJSONArray(Meta);
 }
Example #5
0
 /**
  * create a DBXValueType from a JArray
  * @param json JArray with the values
  * @param vt the DBXValueType to set
  */
 public static void JSONToValueType(TJSONArray arr, DBXValueType vt)
 {
     JArray json = (JArray)arr.getInternalObject();
     vt.setName(json.Value<string>(0));
     vt.setDataType(json.Value<int>(1));
     vt.setOrdinal(json.Value<int>(2));
     vt.setSubType(json.Value<int>(3));
     vt.setScale(json.Value<int>(4));
     vt.setSize(json.Value<int>(5));
     vt.setPrecision(json.Value<int>(6));
     vt.setChildPosition(json.Value<int>(7));
     vt.setNullable(json.Value<bool>(8));
     vt.setHidden(json.Value<bool>(9));
     vt.setParameterDirection(json.Value<int>(10));
     vt.setValueParameter(json.Value<bool>(11));
     vt.setLiteral(json.Value<bool>(12));
 }
Example #6
0
 /**
  * create a DBXValueType from a JArray
  * @param json JArray with the values to set into DBXValuesType
  * @return a DBXValueType
  */
 public static DBXValueType JSONToValueType(TJSONArray json)
 {
     DBXValueType vt = new DBXValueType();
     JSONToValueType(json, vt);
     return vt;
 }