FORGE-995 Modified the equals and hashcode generator.

This is an API breaking change due to the introduction of a new parameter in the method.
FORGE-995: Retained the original method signature for backwards compatibility
Added javadoc to Refactory class