psdi.mbo

Class QbeFilter

  • java.lang.Object
    • psdi.mbo.QbeFilter


  • public class QbeFilter
    extends java.lang.Object
    This helper class collects Qbe expressions per attribute for a Mbo and its related Mbos. The filter can then be used to see if a Mbo satisfies the filter or not.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      class  QbeFilter.AttributeExpressions
      Note that this class is very similar to the inner class with the same name in MboQbe
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.util.Locale locale
      Locale is used to interpet date and time queries
      protected java.util.TimeZone timeZone
      TimeZone is used to interpet date and time queries
      protected boolean useCaseSensitivity
      Determines whether whether strings are compared with case sensitivity.
      protected java.lang.Boolean useExactMatch
      Determines whether the default comparison is like or equals.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String[][] getQbe()
      Return all the QBE expressions defined.
      java.lang.String getQbe(java.lang.String attrName)
      Gets the Qbe filter for an attribute.
      boolean hasQbe()
      Is any Qbe Filter defined?
      void ignoreQbeExactMatchSet(boolean flag)
      Why is this here? Copied from MboQbe.
      boolean isIgnoreQbeExactMatchSet() 
      boolean isUsingQbeExactMatch()
      Return the state of the useExactMatch
      void resetQbe()
      Reset sets up the filter for use.
      boolean satisfy(MboRemote mbo)
      Does this Mbo satisfy the defined filter?
      void setOperatorOr()
      Set the operator to OR
      void setQbe(java.lang.String attrName, java.lang.String expr)
      Sets the Qbe filter for an attribute.
      void setQbeCaseSensitive(boolean state)
      Determines case sensitivity of the filter.
      void setQbeExactMatch(boolean state)
      Determines whether to use equals or like as the default comparision.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • useExactMatch

        protected java.lang.Boolean useExactMatch
        Determines whether the default comparison is like or equals.
      • useCaseSensitivity

        protected boolean useCaseSensitivity
        Determines whether whether strings are compared with case sensitivity.
      • locale

        protected java.util.Locale locale
        Locale is used to interpet date and time queries
      • timeZone

        protected java.util.TimeZone timeZone
        TimeZone is used to interpet date and time queries
    • Constructor Detail

      • QbeFilter

        public QbeFilter(MboSet set)
                  throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • QbeFilter

        public QbeFilter(MboSetInfo ms,
                         boolean processML,
                         UserInfo userInfo)
        Construct the Query, attached to a certain MboSet with default Locale
      • QbeFilter

        public QbeFilter(MboSetInfo ms,
                         java.util.Locale l,
                         java.util.TimeZone tz,
                         boolean ml,
                         UserInfo userInfo)
        Construct the Query, attached to a certain MboSet with specified Locale
    • Method Detail

      • resetQbe

        public void resetQbe()
        Reset sets up the filter for use.
      • setQbe

        public void setQbe(java.lang.String attrName,
                           java.lang.String expr)
                    throws MXException
        Sets the Qbe filter for an attribute. This can be an attribute in the parent MboSet, or in a MboSet related to Mbos in the parent MboSet, specified using the usual dot notation. The expression given replaces any previously set expression. If the expression given is null or the empty string, the filter for the attribute is removed.
        Parameters:
        attrName - The name of the attribute
        expr - The expression for the filter
        Throws:
        MXException
      • getQbe

        public java.lang.String getQbe(java.lang.String attrName)
                                throws MXException
        Gets the Qbe filter for an attribute.
        Parameters:
        attrName - The name of the attribute
        Returns:
        The filter expression or the empty string if none.
        Throws:
        MXException
      • hasQbe

        public boolean hasQbe()
        Is any Qbe Filter defined?
        Returns:
        true if any Qbe filter is defined.
      • satisfy

        public boolean satisfy(MboRemote mbo)
                        throws MXException,
                               java.rmi.RemoteException
        Does this Mbo satisfy the defined filter?
        Parameters:
        mbo - The Mbo
        Returns:
        true if the Mbo satisfies the filter.
        Throws:
        MXException
        java.rmi.RemoteException
      • setQbeExactMatch

        public void setQbeExactMatch(boolean state)
        Determines whether to use equals or like as the default comparision.
      • setQbeCaseSensitive

        public void setQbeCaseSensitive(boolean state)
        Determines case sensitivity of the filter. Only applies to String attributes.
      • setOperatorOr

        public void setOperatorOr()
        Set the operator to OR
      • isUsingQbeExactMatch

        public boolean isUsingQbeExactMatch()
        Return the state of the useExactMatch
      • getQbe

        public java.lang.String[][] getQbe()
                                    throws MXException
        Return all the QBE expressions defined. If none are defined, return null ;
        Throws:
        MXException
      • ignoreQbeExactMatchSet

        public void ignoreQbeExactMatchSet(boolean flag)
        Why is this here? Copied from MboQbe.
        Parameters:
        flag - What value to give the ignore-the-Qbe-Exact-Match-flag flag.
      • isIgnoreQbeExactMatchSet

        public boolean isIgnoreQbeExactMatchSet()