Added utility function convertValueToJavaType

Added a function to the BaseORMService that will convert a value to the
proper JavaType for the property passed in.  This can be used instead
of javacasting the property yourself and is handy for cross engine compatibility.