Package com.pardot.rhombus.cobject

Examples of com.pardot.rhombus.cobject.CField


        assertEquals(expected, result);
    }

    @Test
    public void typedObjectFromLegitStringAndVarint() throws CObjectParseException {
        CField field = new CField("test", "varint");
        String jsonValue = "1234567890123456789012345";
        BigInteger expected = new BigInteger("1234567890123456789012345");

        Object result = JsonUtil.typedObjectFromValueAndField(jsonValue, field);
        assertEquals(expected, result);
View Full Code Here


        assertEquals(expected, result);
    }

    @Test(expected=IllegalArgumentException.class)
    public void typedObjectFromCrapStringAndVarint() throws CObjectParseException {
        CField field = new CField("test", "varint");
        String jsonValue = "I like ponies";

        JsonUtil.typedObjectFromValueAndField(jsonValue, field);
    }
View Full Code Here

    //set the Id
    ret.put("id", idInRange.getId());

    //set the index values
    for(String indexValue : index.getCompositeKeyList()){
      CField f = def.getField(indexValue);
      ret.put(indexValue,getFieldValueAtCounter(topCounter,f));
    }

    //set the non-index values
    for(String nonIndexValue : this.nonIndexValuesOnAnyIndex){
      CField f = def.getField(nonIndexValue);
      ret.put(nonIndexValue,getFieldValueAtCounter(idInRange.getCounterValue(),f));
    }
    return ret;
  }
View Full Code Here

TOP

Related Classes of com.pardot.rhombus.cobject.CField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.