Added support for specifying schema in Scala and Java helper classes