Use EntityInterface instead of class constants.