import org.mule.weave.v2.pojo.GenderEnum
import org.mule.weave.v2.pojo.SimplePojo

import javax.xml.datatype.DatatypeFactory

def simplePojo = new SimplePojo()

simplePojo.string = "Mariano"

simplePojo.booleanPrimitive = true
simplePojo.booleanWrapper = true

simplePojo.intPrimitive = 1
simplePojo.intWrapper = 2

simplePojo.longWrapper = 30000000L
simplePojo.longPrimitive = 30000000L

simplePojo.doublePrimitive = 3000.2D
simplePojo.doubleWrapper = 3000.2D

simplePojo.floatPrimitive = 3000.2
simplePojo.floatWrapper = 3000.2

simplePojo.charPrimitive = 'a'
simplePojo.charWrapper = 'z'

simplePojo.arrayByteprimitive = "hola".bytes
simplePojo.arrayByteWrapper = "hola".bytes

simplePojo.arrayCharprimitive = ['h', 'o', 'l', 'a']
simplePojo.arrayCharWrapper = ['h', 'o', 'l', 'a']
simplePojo.listCharWrapper = [new Character('h' as char),new Character('o' as char), new Character('l' as char), new Character('a' as char)]

simplePojo.shortPrimitive = 1
simplePojo.shortWrapper = 2

simplePojo.arrayIntprimitive = [1, 2, 3, 4]
simplePojo.arrayIntWrapper = [1, 2, 3, 4]
simplePojo.listIntWrapper = [1, 2, 3, 4]

def instance = Calendar.getInstance(TimeZone.getDefault())
instance.set(2014, 10, 12, 11, 11, 19)
instance.set(Calendar.MILLISECOND, 0)
simplePojo.date = instance.getTime()

simplePojo.sqlDate = new java.sql.Date(2014, 12, 11)

instance = Calendar.getInstance(TimeZone.getDefault())
instance.set(2014, 10, 12, 11, 11, 19)
instance.set(Calendar.MILLISECOND, 0)
simplePojo.calendar = instance

DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
simplePojo.xmlCalendar = datatypeFactory.newXMLGregorianCalendar(2014, 10, 12, 11, 11, 19, 0, -3)

simplePojo.bigDecimal = new BigDecimal(12.3)
simplePojo.bigInteger = new BigInteger(2222)
simplePojo.gender = GenderEnum.FEMALE

return simplePojo