Class QueryForeignKey

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String fieldName  
      protected QueryClass qc  
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryForeignKey​(QueryClass qc, java.lang.String fieldName)
      Constructs a QueryForeignKey representing the specified field of a QueryClass
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getApproximateType()
      Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained.
      java.lang.String getFieldName()
      Gets the fieldname of this QueryReference.
      QueryClass getQueryClass()
      Gets the QueryClass of which this reference is an member.
      java.lang.Class<?> getType()
      Gets the Java class of this QueryReference.
      void youAreType​(java.lang.Class<?> cls)
      Allows a caller to suggest to this object that it holds a value of a certain type.
      • Methods inherited from class java.lang.Object

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

      • fieldName

        protected java.lang.String fieldName
    • Constructor Detail

      • QueryForeignKey

        public QueryForeignKey​(QueryClass qc,
                               java.lang.String fieldName)
        Constructs a QueryForeignKey representing the specified field of a QueryClass
        Parameters:
        qc - the QueryClass
        fieldName - the name of the relevant field
        Throws:
        java.lang.NullPointerException - if the field name is null
        java.lang.IllegalArgumentException - if the field is not a reference, or does not exist
    • Method Detail

      • getQueryClass

        public QueryClass getQueryClass()
        Gets the QueryClass of which this reference is an member.
        Returns:
        the QueryClass
      • getType

        public java.lang.Class<?> getType()
        Gets the Java class of this QueryReference.
        Specified by:
        getType in interface QueryOrderable
        Specified by:
        getType in interface QuerySelectable
        Returns:
        the class name
      • getFieldName

        public java.lang.String getFieldName()
        Gets the fieldname of this QueryReference.
        Returns:
        the field name
      • youAreType

        public void youAreType​(java.lang.Class<?> cls)
        Allows a caller to suggest to this object that it holds a value of a certain type. This method should only be called on objects which report their type to be UnknownTypeValue. Otherwise, this method will throw and exception.
        Specified by:
        youAreType in interface QueryEvaluable
        Parameters:
        cls - the Class of the type to be imposed on this object
      • getApproximateType

        public int getApproximateType()
        Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained.
        Specified by:
        getApproximateType in interface QueryEvaluable
        Returns:
        an int, as described in UnknownTypeValue