public class QConObject extends QCon
_children, i_evaluator, i_parent| Constructor and Description |
|---|
QConObject() |
QConObject(Transaction a_trans,
QCon a_parent,
QField a_field,
java.lang.Object a_object) |
| Modifier and Type | Method and Description |
|---|---|
Constraint |
byExample()
set the evaluation mode to object comparison (query by example).
|
boolean |
canBeIndexLeaf() |
boolean |
canLoadByIndex() |
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". |
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 |
hasObjectInParentPath(java.lang.Object obj) |
Constraint |
identity()
sets the evaluation mode to identity comparison.
|
int |
identityID() |
Constraint |
like()
sets the evaluation mode to "like" comparison.
|
boolean |
onSameFieldAs(QCon other) |
Constraint |
smaller()
sets the evaluation mode to
<. |
Constraint |
startsWith(boolean caseSensitive)
sets the evaluation mode to string startsWith comparison.
|
java.lang.String |
toString() |
void |
visit(java.lang.Object obj) |
and, childrenCount, container, evaluator, hasChildren, hasJoins, hasParent, id, internalSetProcessedByIndex, iterateChildren, iterateJoins, not, or, parent, processedByIndex, setCandidates, setProcessedByIndex, streamLock, transactionpublic QConObject()
public QConObject(Transaction a_trans, QCon a_parent, QField a_field, java.lang.Object a_object)
public boolean canBeIndexLeaf()
canBeIndexLeaf in class QConpublic boolean canLoadByIndex()
canLoadByIndex in class QConpublic boolean hasObjectInParentPath(java.lang.Object obj)
hasObjectInParentPath in class QConpublic int identityID()
identityID in class QConpublic boolean onSameFieldAs(QCon other)
onSameFieldAs in class QConpublic void visit(java.lang.Object obj)
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 Constraintcontains in class QConConstraint 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 Constraintequal in class QConConstraint to allow the chaining of method calls.public java.lang.Object getObject()
ConstraintConstraint.getObject in interface ConstraintgetObject in class QConpublic Constraint greater()
Constraint>.
For example:query.constrain(Pilot.class);query.descend("points").constrain(101).greater()greater in interface Constraintgreater in class QConConstraint to allow the chaining of method calls.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 Constraintidentity in class QConConstraint to allow the chaining of method calls.public Constraint byExample()
ConstraintbyExample in interface ConstraintbyExample in class QConConstraint to allow the chaining of method calls.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 Constraintlike in class QConConstraint to allow the chaining of method calls.public Constraint smaller()
Constraint<.
For example:query.constrain(Pilot.class);query.descend("points").constrain(101).smaller()smaller in interface Constraintsmaller in class QConConstraint 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 ConstraintstartsWith in class QConcaseSensitive - 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 ConstraintendsWith in class QConcaseSensitive - comparison will be case sensitive if true, case insensitive otherwiseConstraint to allow the chaining of method calls.public java.lang.String toString()
toString in class java.lang.Object