use of io.atlasmap.java.test.BaseFlatPrimitiveClass in project atlasmap by atlasmap.
the class JsonJavaFlatMappingTest method generateFlatPrimitiveClassPrimitiveFieldsBoxedValues.
protected BaseFlatPrimitiveClass generateFlatPrimitiveClassPrimitiveFieldsBoxedValues(Class<? extends BaseFlatPrimitiveClass> clazz) throws Exception {
Class<?> targetClazz = this.getClass().getClassLoader().loadClass(clazz.getName());
BaseFlatPrimitiveClass newObject = (BaseFlatPrimitiveClass) targetClazz.newInstance();
newObject.setBooleanField(Boolean.valueOf(Boolean.FALSE));
newObject.setByteField(new Byte((byte) 99));
newObject.setCharField(new Character('a'));
newObject.setDoubleField(new Double(50000000d));
newObject.setFloatField(new Float(40000000f));
newObject.setIntField(new Integer(2));
newObject.setLongField(new Long(30000L));
newObject.setShortField(new Short((short) 1));
return newObject;
}
use of io.atlasmap.java.test.BaseFlatPrimitiveClass in project atlasmap by atlasmap.
the class JsonJavaFlatMappingTest method generateFlatPrimitiveClass.
protected BaseFlatPrimitiveClass generateFlatPrimitiveClass(Class<? extends BaseFlatPrimitiveClass> clazz) throws Exception {
Class<?> targetClazz = this.getClass().getClassLoader().loadClass(clazz.getName());
BaseFlatPrimitiveClass newObject = (BaseFlatPrimitiveClass) targetClazz.newInstance();
newObject.setBooleanField(false);
newObject.setByteField((byte) 99);
newObject.setCharField('a');
newObject.setDoubleField(50000000d);
newObject.setFloatField(40000000f);
newObject.setIntField(2);
newObject.setLongField(30000L);
newObject.setShortField((short) 1);
return newObject;
}
Aggregations