Package org.hcjf.layers.query.model
Class QueryParameter
- java.lang.Object
-
- org.hcjf.layers.query.model.QueryParameter
-
- All Implemented Interfaces:
java.lang.Comparable<QueryParameter>,QueryComponent
- Direct Known Subclasses:
QueryField,QueryFunction
public abstract class QueryParameter extends java.lang.Object implements java.lang.Comparable<QueryParameter>, QueryComponent
-
-
Constructor Summary
Constructors Constructor Description QueryParameter(Query query, java.lang.String originalValue, java.lang.String value)
-
Method Summary
Modifier and Type Method Description intcompareTo(QueryParameter o)Compare the string representation of both objects.booleanequals(java.lang.Object obj)Compare the original value of the fields.java.lang.StringgetFieldPath()Returns the field path.java.lang.StringgetOriginalValue()Returns the original value.QueryResourcegetResource()Returns the resource of this parameter.booleanisUnderlying()This method returns true if the component is underlying and false in the otherwise.java.lang.StringtoString()Return the original representation of the field.abstract booleanverifyResource(QueryResource resource)Verify if the query parameter make reference to the specified resource.
-
-
-
Constructor Detail
-
QueryParameter
public QueryParameter(Query query, java.lang.String originalValue, java.lang.String value)
-
-
Method Detail
-
getResource
public QueryResource getResource()
Returns the resource of this parameter.- Returns:
- Resource of this parameter.
-
getFieldPath
public java.lang.String getFieldPath()
Returns the field path.- Returns:
- Field path.
-
getOriginalValue
public java.lang.String getOriginalValue()
Returns the original value.- Returns:
- Original value.
-
toString
public java.lang.String toString()
Return the original representation of the field.- Overrides:
toStringin classjava.lang.Object- Returns:
- Original representation.
-
isUnderlying
public boolean isUnderlying()
This method returns true if the component is underlying and false in the otherwise.- Specified by:
isUnderlyingin interfaceQueryComponent- Returns:
- Underlying value.
-
equals
public boolean equals(java.lang.Object obj)
Compare the original value of the fields.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- Other field.- Returns:
- True if the fields are equals.
-
compareTo
public int compareTo(QueryParameter o)
Compare the string representation of both objects.- Specified by:
compareToin interfacejava.lang.Comparable<QueryParameter>- Parameters:
o- Other object.- Returns:
- Magnitude of the difference between both objects.
-
verifyResource
public abstract boolean verifyResource(QueryResource resource)
Verify if the query parameter make reference to the specified resource.- Parameters:
resource- Resource instance to test.- Returns:
- Returns true if the parameter make reference to the specified resource and false in the otherwise.
-
-