Several Refactorings to Entity classes. Added a local interface for DataQueryServiceBean to expose some queries only locally.

Signed-off-by: Kavith Thiranga Lokuhewage <rc404mekt@gmail.com>