Tabnine Logo
BaseCondition.or
Code IndexAdd Tabnine to your IDE (free)

How to use
or
method
in
io.yawp.repository.query.condition.BaseCondition

Best Java code snippets using io.yawp.repository.query.condition.BaseCondition.or (Showing top 4 results out of 315)

origin: feroult/yawp

@Test
public void testJoinedConditions() {
  BasicObject object = new BasicObject();
  object.setIntValue(10);
  object.setStringValue("ccc");
  object.setLongValue(100l);
  assertTrue(c("intValue", "=", 10).and(c("stringValue", "=", "ccc")).evaluate(object));
  assertFalse(c("intValue", "=", 10).and(c("stringValue", "!=", "ccc")).evaluate(object));
  assertTrue(c("intValue", "=", 9).or(c("stringValue", "=", "ccc")).evaluate(object));
  assertFalse(c("intValue", "=", 10).not().evaluate(object));
  assertTrue(c("intValue", "=", 9).not().evaluate(object));
  assertTrue(c("intValue", "=", 9).or(c("stringValue", "=", "bbb").or(c("longValue", "=", 100l))).evaluate(object));
}
origin: feroult/yawp

@Test
public void testWhereWithoutIndexOrCondition() {
  yawp.save(new BasicObject("a", 1l));
  yawp.save(new BasicObject("b", 2l));
  yawp.save(new BasicObject("c", 1l));
  List<BasicObject> objects = yawp(BasicObject.class).where(c("stringValue", "=", "a").or(c("longValue", "=", 1l))).list();
  assertObjects(objects, "a", "c");
}
origin: feroult/yawp

@Test
public void testWhereWithoutIndexComplexConditions() {
  yawp.save(new BasicObject("a", 1l));
  yawp.save(new BasicObject("a", 2l));
  yawp.save(new BasicObject("c", 3l));
  yawp.save(new BasicObject("c", 4l));
  yawp.save(new BasicObject("d", 5l));
  yawp.save(new BasicObject("e", 6l));
  BaseCondition c2 = c("stringValue", "=", "c").and(c("longValue", "=", 3l));
  List<BasicObject> objects = yawp(BasicObject.class).where(c("stringValue", "=", "a").or(c2)).list();
  assertObjects(objects, "a", "a", "c");
}
origin: feroult/yawp

@Test
public void testWhereWithoutIndexWithId() {
  yawp.save(setId(new BasicObject("a", 1l), 1l));
  yawp.save(setId(new BasicObject("b", 2l), 2l));
  yawp.save(setId(new BasicObject("c", 3l), 3l));
  IdRef<BasicObject> id = IdRef.create(yawp, BasicObject.class, 1l);
  List<BasicObject> objects = yawp(BasicObject.class).where(c("id", "=", id).or(c("longValue", "=", 3l))).list();
  assertObjects(objects, "a", "c");
  objects = yawp(BasicObject.class).where(c("id", "=", id).and(c("longValue", "=", 1l))).list();
  assertObjects(objects, "a");
  objects = yawp(BasicObject.class).where(c("id", "=", id).and(c("longValue", "=", 3l))).list();
  assertObjects(objects);
}
io.yawp.repository.query.conditionBaseConditionor

Popular methods of BaseCondition

  • hasPreFilter
  • evaluate
  • init
  • not
  • and
  • applyPostFilter
  • hasPostFilter
  • toMap

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now