Package org.intermine.objectstore.query
Class QueryForeignKey
- java.lang.Object
- 
- org.intermine.objectstore.query.QueryForeignKey
 
- 
- All Implemented Interfaces:
- QueryEvaluable,- QueryNode,- QueryOrderable,- QuerySelectable
 
 public class QueryForeignKey extends java.lang.Object implements QueryEvaluable Represents the ID of a field of a QueryClass that is a business object- Author:
- Matthew Wakeling
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringfieldNameprotected QueryClassqc
 - 
Constructor SummaryConstructors Constructor Description QueryForeignKey(QueryClass qc, java.lang.String fieldName)Constructs a QueryForeignKey representing the specified field of a QueryClass
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetApproximateType()Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained.java.lang.StringgetFieldName()Gets the fieldname of this QueryReference.QueryClassgetQueryClass()Gets the QueryClass of which this reference is an member.java.lang.Class<?>getType()Gets the Java class of this QueryReference.voidyouAreType(java.lang.Class<?> cls)Allows a caller to suggest to this object that it holds a value of a certain type.
 
- 
- 
- 
Field Detail- 
qcprotected QueryClass qc 
 - 
fieldNameprotected java.lang.String fieldName 
 
- 
 - 
Constructor Detail- 
QueryForeignKeypublic 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- 
getQueryClasspublic QueryClass getQueryClass() Gets the QueryClass of which this reference is an member.- Returns:
- the QueryClass
 
 - 
getTypepublic java.lang.Class<?> getType() Gets the Java class of this QueryReference.- Specified by:
- getTypein interface- QueryOrderable
- Specified by:
- getTypein interface- QuerySelectable
- Returns:
- the class name
 
 - 
getFieldNamepublic java.lang.String getFieldName() Gets the fieldname of this QueryReference.- Returns:
- the field name
 
 - 
youAreTypepublic 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:
- youAreTypein interface- QueryEvaluable
- Parameters:
- cls- the Class of the type to be imposed on this object
 
 - 
getApproximateTypepublic int getApproximateType() Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained.- Specified by:
- getApproximateTypein interface- QueryEvaluable
- Returns:
- an int, as described in UnknownTypeValue
 
 
- 
 
-