Added the convertDataToEntity method.