Class ChildByNameConstraint

  • All Implemented Interfaces:
    MemberChildrenConstraint, SqlConstraint

    class ChildByNameConstraint
    extends DefaultMemberChildrenConstraint
    Constraint which optimizes the search for a child by name. This is used whenever the string representation of a member is parsed, e.g. [Customers].[USA].[CA]. Restricts the result to the member we are searching for.
    Author:
    avix
    • Constructor Detail

      • ChildByNameConstraint

        public ChildByNameConstraint​(Id.NameSegment childName)
        Creates a ChildByNameConstraint.
        Parameters:
        childName - Name of child
      • ChildByNameConstraint

        public ChildByNameConstraint​(java.util.List<Id.NameSegment> childNames)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getCacheKey

        public java.lang.Object getCacheKey()
        Description copied from interface: SqlConstraint
        Returns a key that becomes part of the key for caching the result of the SQL query. So SqlConstraint instances that produce the same SQL resultset must return equal keys in terms of equal() and hashCode().
        Specified by:
        getCacheKey in interface SqlConstraint
        Overrides:
        getCacheKey in class DefaultMemberChildrenConstraint
        Returns:
        valid key or null to prevent the result from being cached
      • getChildNames

        public java.util.List<java.lang.String> getChildNames()