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

import javax.xml.datatype.DatatypeFactory
import java.sql.Time
import java.sql.Timestamp

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.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()
instance.set(Calendar.MONTH, 9)
instance.set(Calendar.DAY_OF_MONTH, 1)
instance.set(Calendar.YEAR, 2014)
instance.set(Calendar.HOUR_OF_DAY, 0)
instance.set(Calendar.MINUTE, 0)
instance.set(Calendar.SECOND, 0)
instance.set(Calendar.MILLISECOND, 0)
simplePojo.date = instance.getTime()


instance = Calendar.getInstance(TimeZone.getTimeZone("GMT-8:00"))
instance.set(2014, 9, 1, 23, 57, 59)
instance.set(Calendar.MILLISECOND, 0)
simplePojo.calendar = instance

DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
simplePojo.xmlCalendar = datatypeFactory.newXMLGregorianCalendar(2014, 10, 1, 23, 57, 59, 0, -480)

simplePojo.bigDecimal = new BigDecimal("123.23")
simplePojo.bigInteger = new BigInteger("123")
simplePojo.gender = GenderEnum.MALE

simplePojo.stringSet = ["Luis","Miguel","de Bello"]

simplePojo.timestamp = new Timestamp(instance.getTimeInMillis())
simplePojo.time = new Time(instance.getTimeInMillis())
simplePojo.bite = "1".getBytes()[0]

return simplePojo