public class Query extends RMObject implements RMJSONArchiver.GetKeys, java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
Condition_Prop |
static java.lang.String |
Sort_Prop |
Constructor and Description |
---|
Query()
Creates a new query.
|
Query(Entity anEntity)
Creates a new query with given entity.
|
Query(java.lang.String anEntityName)
Creates a new query with given entity name.
|
Modifier and Type | Method and Description |
---|---|
Query |
addCondition(Condition aCondition)
Adds a condition to query.
|
Query |
addCondition(java.lang.String aPropertyName,
Condition.Operator anOperator,
java.lang.Object aValue)
Adds a condition to query for given property name, operator and value.
|
void |
addSort(Sort aSort)
Adds a sort or sorts to list.
|
void |
addSort(Sort aSort,
int anIndex)
Adds a sort at given index.
|
Query |
clone()
Standard clone implementation.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
Condition |
getCondition()
Returns the condition.
|
java.lang.String |
getEntityName()
Returns the data source entity name.
|
int |
getFetchLimit()
Returns the fetch limit.
|
int |
getFetchLimitDefault()
Returns the fetch limit default (Integer.MAX_VALUE).
|
java.util.List<java.lang.String> |
getJSONKeys()
RMJSONArchiver.GetKeys method.
|
int |
getSortCount()
Returns the number of sorts.
|
java.util.List<Sort> |
getSorts()
Returns the list of sorts.
|
void |
propertyChange(java.beans.PropertyChangeEvent anEvent)
Implement PropertyChangeListener method to forward on.
|
Sort |
removeSort(int anIndex)
Removes a sort at given index.
|
int |
removeSort(Sort aSort)
Removes given sort.
|
void |
setCondition(Condition aCondition)
Sets the condition.
|
void |
setEntityName(java.lang.String anEntityName)
Sets the data source entity name.
|
void |
setFetchLimit(int aValue)
Sets the fetch limit.
|
void |
setSorts(java.util.List<Sort> theSorts)
Sets the list of sorts.
|
java.lang.String |
toString()
Returns a string representation of query.
|
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public static final java.lang.String Condition_Prop
public static final java.lang.String Sort_Prop
public Query()
public Query(java.lang.String anEntityName)
public Query(Entity anEntity)
public java.lang.String getEntityName()
public void setEntityName(java.lang.String anEntityName)
public Condition getCondition()
public void setCondition(Condition aCondition)
public Query addCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)
public int getFetchLimit()
public void setFetchLimit(int aValue)
public int getFetchLimitDefault()
public int getSortCount()
public java.util.List<Sort> getSorts()
public void setSorts(java.util.List<Sort> theSorts)
public void addSort(Sort aSort)
public void addSort(Sort aSort, int anIndex)
public Sort removeSort(int anIndex)
public int removeSort(Sort aSort)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
propertyChange
in interface java.beans.PropertyChangeListener
public Query clone()
clone
in class RMListenerList
public java.util.List<java.lang.String> getJSONKeys()
getJSONKeys
in interface RMJSONArchiver.GetKeys