Tabnine Logo
SimpleCondition.getWhereValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getWhereValue
method
in
io.yawp.repository.query.condition.SimpleCondition

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

origin: feroult/yawp

@SuppressWarnings("unchecked")
private T executeQueryById() {
  SimpleCondition c = (SimpleCondition) condition;
  IdRef<T> id = (IdRef<T>) c.getWhereValue();
  executedQueryType = QueryType.FETCH;
  RepositoryHooks.beforeQuery(this);
  T retrieved = hasForcedResponse(executedQueryType) ? getForcedResultFetch() : doExecuteQueryById(id);
  executedResponse = retrieved;
  RepositoryHooks.afterQuery(this);
  return retrieved;
}
origin: feroult/yawp

private Filter createSimpleFilter(QueryBuilder<?> builder, SimpleCondition condition) throws FalsePredicateException {
  String field = condition.getField();
  Class<?> clazz = builder.getModel().getClazz();
  Object whereValue = condition.getWhereValue();
  WhereOperator whereOperator = condition.getWhereOperator();
  String actualFieldName = getActualFieldName(field, clazz);
  Object actualValue = getActualFieldValue(field, clazz, whereValue);
  if (whereOperator == WhereOperator.IN && listSize(whereValue) == 0) {
    throw new FalsePredicateException();
  }
  return new FilterPredicate(actualFieldName, getFilterOperator(whereOperator), actualValue);
}
origin: feroult/yawp

private void assertSimpleCondition(BaseCondition c, String p, WhereOperator whereOperator, Object value) {
  assertEquals(SimpleCondition.class, c.getClass());
  SimpleCondition condition = (SimpleCondition) c;
  assertEquals(p, condition.getField());
  assertEquals(whereOperator, condition.getWhereOperator());
  assertEquals(value, condition.getWhereValue());
}
origin: feroult/yawp

private String simpleWhere(SimpleCondition condition) throws FalsePredicateException {
  String fieldName = condition.getField();
  Class<?> clazz = builder.getModel().getClazz();
  Object whereValue = condition.getWhereValue();
  WhereOperator whereOperator = condition.getWhereOperator();
  String actualFieldName = getActualFieldName(fieldName, clazz);
  Object actualValue = getActualFieldValue(fieldName, clazz, whereValue);
  if (whereOperator == WhereOperator.IN) {
    if (listSize(whereValue) == 0) {
      throw new FalsePredicateException();
    }
    return whereCollectionValue(fieldName, actualFieldName, whereOperator, (Collection<?>) actualValue);
  }
  return whereSingleValue(fieldName, actualFieldName, whereOperator, actualValue);
}
io.yawp.repository.query.conditionSimpleConditiongetWhereValue

Popular methods of SimpleCondition

  • getField
  • getWhereOperator
  • <init>
  • assertIsList
  • convertToIdRefs
  • hasPreFilter
  • isEqualOperator
  • isIdField
  • isRefField
  • normalizeIdRefs

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • CodeWhisperer alternatives
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