Moving data type conversion into the entity class.