equals() 和 hashCode() 在 hybris 中覆盖
equals() and hashCode() override in hybris
有什么方法可以覆盖 *-items.xml
类型的 equals()
和 hashCode()
方法吗?例如:
<itemtype code="FaqParagraph" extends="GenericItem" autocreate="true" generate="true"
jaloclass="com.training.core.jalo.FaqParagraph">
<deployment table="FaqParagraph" typecode="20004"/>
<attributes>
<attribute qualifier="code" type="java.lang.String">
<modifiers initial="true" write="false" optional="false"/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
有什么方法可以覆盖 FaqParagraphModel
的 equals()
和 hashCode()
吗?
如果您的问题是关于生成的 **Model 实例,则不可能有 hashCode
和 equals
的自定义实现。请注意,如果 "generated" 实现具有相同的 PK
并且在相同的 tenant
.
中,则两个实例被视为相等
有什么方法可以覆盖 *-items.xml
类型的 equals()
和 hashCode()
方法吗?例如:
<itemtype code="FaqParagraph" extends="GenericItem" autocreate="true" generate="true"
jaloclass="com.training.core.jalo.FaqParagraph">
<deployment table="FaqParagraph" typecode="20004"/>
<attributes>
<attribute qualifier="code" type="java.lang.String">
<modifiers initial="true" write="false" optional="false"/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
有什么方法可以覆盖 FaqParagraphModel
的 equals()
和 hashCode()
吗?
如果您的问题是关于生成的 **Model 实例,则不可能有 hashCode
和 equals
的自定义实现。请注意,如果 "generated" 实现具有相同的 PK
并且在相同的 tenant
.