Enhanced the Java Entity class to make it full featured.