public abstract class QCon extends java.lang.Object implements Constraint, Visitor4, Unversioned
| Modifier and Type | Field and Description |
|---|---|
protected List4 |
_children |
protected QE |
i_evaluator |
protected QCon |
i_parent |
| Constructor and Description |
|---|
QCon() |
| Modifier and Type | Method and Description |
|---|---|
Constraint |
and(Constraint andWith)
links two Constraints for AND evaluation.
|
Constraint |
byExample()
set the evaluation mode to object comparison (query by example).
|
boolean |
canBeIndexLeaf() |
boolean |
canLoadByIndex() |
int |
childrenCount() |
ObjectContainerBase |
container() |
Constraint |
contains()
sets the evaluation mode to string contains comparison.
|
Constraint |
endsWith(boolean caseSensitive)
sets the evaluation mode to string endsWith comparison.
|
Constraint |
equal()
Used in conjunction with
Constraint.smaller() or Constraint.greater() to create constraints
like "smaller or equal", "greater or equal". |
QE |
evaluator() |
QField |
getField() |
java.lang.Object |
getObject()
returns the Object the query graph was constrained with to
create this
Constraint. |
Constraint |
greater()
sets the evaluation mode to
>. |
boolean |
hasChildren() |
boolean |
hasJoins() |
boolean |
hasObjectInParentPath(java.lang.Object obj) |
boolean |
hasParent() |
int |
id() |
Constraint |
identity()
sets the evaluation mode to identity comparison.
|
int |
identityID() |
protected void |
internalSetProcessedByIndex() |
Iterator4 |
iterateChildren() |
Iterator4 |
iterateJoins() |
Constraint |
like()
sets the evaluation mode to "like" comparison.
|
Constraint |
not()
turns on not() comparison.
|
boolean |
onSameFieldAs(QCon other) |
Constraint |
or(Constraint orWith)
links two Constraints for OR evaluation.
|
QCon |
parent() |
boolean |
processedByIndex() |
void |
setCandidates(QCandidates a_candidates) |
void |
setProcessedByIndex() |
Constraint |
smaller()
sets the evaluation mode to
<. |
Constraint |
startsWith(boolean caseSensitive)
sets the evaluation mode to string startsWith comparison.
|
protected java.lang.Object |
streamLock() |
Transaction |
transaction() |
void |
visit(java.lang.Object obj) |
protected List4 _children
protected QE i_evaluator
protected QCon i_parent
public ObjectContainerBase container()
public Transaction transaction()
public Constraint and(Constraint andWith)
Constraintquery.constrain(Pilot.class);query.descend("points").constrain(101).smaller().and(query.descend("name").constrain("Test Pilot0")); and in interface ConstraintandWith - the other ConstraintConstraint, that can be used for further calls
to Constraint.and(Constraint) and Constraint.or(Constraint)public boolean canBeIndexLeaf()
public boolean canLoadByIndex()
public Constraint contains()
ConstraintPilot pilot = new Pilot("Test Pilot1", 100);container.store(pilot); ...query.constrain(Pilot.class);// All pilots with the name containing "est" will be retrievedquery.descend("name").constrain("est").contains();contains in interface ConstraintConstraint to allow the chaining of method calls.like() for case insensitive string comparisonpublic Constraint equal()
ConstraintConstraint.smaller() or Constraint.greater() to create constraints
like "smaller or equal", "greater or equal".
For example:query.constrain(Pilot.class);query.descend("points").constrain(101).smaller().equal();equal in interface ConstraintConstraint to allow the chaining of method calls.public QField getField()
public java.lang.Object getObject()
ConstraintConstraint.getObject in interface Constraintpublic Constraint greater()
Constraint>.
For example:query.constrain(Pilot.class);query.descend("points").constrain(101).greater()greater in interface ConstraintConstraint to allow the chaining of method calls.public boolean hasChildren()
public boolean hasParent()
public QCon parent()
public boolean hasJoins()
public boolean hasObjectInParentPath(java.lang.Object obj)
public Constraint identity()
ConstraintPilot pilot = new Pilot("Test Pilot1", 100);Car car = new Car("BMW", pilot);container.store(car);// Change the name, the pilot instance stays the samepilot.setName("Test Pilot2");// create a new carcar = new Car("Ferrari", pilot);container.store(car);Query query = container.query();query.constrain(Car.class);// All cars having pilot with the same database identity// will be retrieved. As we only created Pilot object once// it should mean all car objectsquery.descend("_pilot").constrain(pilot).identity();identity in interface ConstraintConstraint to allow the chaining of method calls.public Constraint byExample()
ConstraintbyExample in interface ConstraintConstraint to allow the chaining of method calls.public int identityID()
public Iterator4 iterateJoins()
public Iterator4 iterateChildren()
public Constraint like()
ConstraintPilot pilot = new Pilot("Test Pilot1", 100);container.store(pilot); ...query.constrain(Pilot.class);// All pilots with the name containing "est" will be retrievedquery.descend("name").constrain("est").like();like in interface ConstraintConstraint to allow the chaining of method calls.public Constraint startsWith(boolean caseSensitive)
ConstraintPilot pilot = new Pilot("Test Pilot0", 100);container.store(pilot); ...query.constrain(Pilot.class);query.descend("name").constrain("Test").startsWith(true);startsWith in interface ConstraintcaseSensitive - comparison will be case sensitive if true, case insensitive otherwiseConstraint to allow the chaining of method calls.public Constraint endsWith(boolean caseSensitive)
ConstraintPilot pilot = new Pilot("Test Pilot0", 100);container.store(pilot); ...query.constrain(Pilot.class);query.descend("name").constrain("T0").endsWith(false);endsWith in interface ConstraintcaseSensitive - comparison will be case sensitive if true, case insensitive otherwiseConstraint to allow the chaining of method calls.public Constraint not()
ConstraintPilot pilot = new Pilot("Test Pilot1", 100);container.store(pilot); ...query.constrain(Pilot.class);query.descend("name").constrain("t0").endsWith(true).not();not in interface ConstraintConstraint to allow the chaining of method calls.public boolean onSameFieldAs(QCon other)
other - public Constraint or(Constraint orWith)
Constraintquery.constrain(Pilot.class);query.descend("points").constrain(101).greater().or(query.descend("name").constrain("Test Pilot0"));or in interface ConstraintorWith - the other ConstraintConstraint, that can be used for further calls
to Constraint.and(Constraint) and Constraint.or(Constraint)public void setCandidates(QCandidates a_candidates)
public Constraint smaller()
Constraint<.
For example:query.constrain(Pilot.class);query.descend("points").constrain(101).smaller()smaller in interface ConstraintConstraint to allow the chaining of method calls.protected java.lang.Object streamLock()
public QE evaluator()
public void setProcessedByIndex()
protected void internalSetProcessedByIndex()
public boolean processedByIndex()
public int childrenCount()
public int id()