@Override
    public int hashCode() {

        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (attributeList != null ? attributeList.hashCode() : 0);
        result = 31 * result + (annotations != null ? annotations.hashCode() : 0);
        return result;
    }
Abstract definition used for Streams, Tables and other common artifacts
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/definition/AbstractDefinition.java