Tabnine Logo
ExpressionMath.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
org.eclipse.persistence.expressions.ExpressionMath

Best Java code snippets using org.eclipse.persistence.expressions.ExpressionMath.add (Showing top 17 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Return a new expression that applies the function to the given expression.
 */
public static Expression add(Expression left, int right) {
  return add(left, Integer.valueOf(right));
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * Return a new expression that applies the function to the given expression.
 */
public static Expression add(Expression left, int right) {
  return add(left, new Integer(right));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Return a new expression that applies the function to the given expression.
 */
public static Expression add(Expression left, int right) {
  return add(left, Integer.valueOf(right));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Retrun an expression that updates the write lock
 */
public Expression getWriteLockUpdateExpression(ExpressionBuilder builder, AbstractSession session) {
  return ExpressionMath.add(builder.getField(writeLockField.getName()), 1);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Retrun an expression that updates the write lock
 */
public Expression getWriteLockUpdateExpression(ExpressionBuilder builder, AbstractSession session) {
  return ExpressionMath.add(builder.getField(writeLockField.getName()), 1);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Retrun an expression that updates the write lock
 */
public Expression getWriteLockUpdateExpression(ExpressionBuilder builder, AbstractSession session) {
  return ExpressionMath.add(builder.getField(writeLockField.getName()), 1);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * {@inheritDoc}
 */
@Override
public void visit(AdditionExpression expression) {
  List<Class<?>> types = new ArrayList<Class<?>>(2);
  // Create the left side of the addition expression
  expression.getLeftExpression().accept(this);
  Expression leftExpression = queryExpression;
  types.add(type[0]);
  // Create the right side of the addition expression
  expression.getRightExpression().accept(this);
  Expression rightExpression = queryExpression;
  types.add(type[0]);
  // Now create the addition expression
  queryExpression = ExpressionMath.add(leftExpression, rightExpression);
  // Set the expression type
  Collections.sort(types, NumericTypeComparator.instance());
  type[0] = types.get(0);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * {@inheritDoc}
 */
@Override
public void visit(AdditionExpression expression) {
  List<Class<?>> types = new ArrayList<Class<?>>(2);
  // Create the left side of the addition expression
  expression.getLeftExpression().accept(this);
  Expression leftExpression = queryExpression;
  types.add(type[0]);
  // Create the right side of the addition expression
  expression.getRightExpression().accept(this);
  Expression rightExpression = queryExpression;
  types.add(type[0]);
  // Now create the addition expression
  queryExpression = ExpressionMath.add(leftExpression, rightExpression);
  // Set the expression type
  Collections.sort(types, NumericTypeComparator.instance());
  type[0] = types.get(0);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL
 * Generate the expression. The steps are:
 * 1. Generate the expression for the left node
 * 2. Add the .plus to the where clause returned from step 1
 * 3. Generate the expression for the right side and use it as the parameter for the .plus()
 * 4. Return the completed where clause to the caller
 */
public Expression generateExpression(GenerationContext context) {
  Expression whereClause = getLeft().generateExpression(context);
  whereClause = ExpressionMath.add(whereClause, getRight().generateExpression(context));
  return whereClause;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL
 * Generate the expression. The steps are:
 * 1. Generate the expression for the left node
 * 2. Add the .plus to the where clause returned from step 1
 * 3. Generate the expression for the right side and use it as the parameter for the .plus()
 * 4. Return the completed where clause to the caller
 */
public Expression generateExpression(GenerationContext context) {
  Expression whereClause = getLeft().generateExpression(context);
  whereClause = ExpressionMath.add(whereClause, getRight().generateExpression(context));
  return whereClause;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL
 * Generate the expression. The steps are:
 * 1. Generate the expression for the left node
 * 2. Add the .plus to the where clause returned from step 1
 * 3. Generate the expression for the right side and use it as the parameter for the .plus()
 * 4. Return the completed where clause to the caller
 */
public Expression generateExpression(GenerationContext context) {
  Expression whereClause = getLeft().generateExpression(context);
  whereClause = ExpressionMath.add(whereClause, getRight().generateExpression(context));
  return whereClause;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Create an expression that returns the sum of its arguments.
 * 
 * @param x
 *            expression
 * @param y
 *            value
 * @return sum
 */
public <N extends Number> Expression<N> sum(Expression<? extends N> x, N y){
  return new FunctionExpressionImpl(this.metamodel, (Class<N>)BasicTypeHelperImpl.getInstance().extendedBinaryNumericPromotion(x.getJavaType(), y.getClass()), ExpressionMath.add(((InternalSelection)x).getCurrentNode(),y), buildList(x,internalLiteral(y)), "sum");
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Create an expression that returns the sum of its arguments.
 * 
 * @param x
 *            value
 * @param y
 *            expression
 * @return sum
 */
public <N extends Number> Expression<N> sum(N x, Expression<? extends N> y){
  return new FunctionExpressionImpl(this.metamodel, (Class<N>)BasicTypeHelperImpl.getInstance().extendedBinaryNumericPromotion(x.getClass(), y.getJavaType()), ExpressionMath.add(new ConstantExpression(x, ((InternalSelection)y).getCurrentNode()),((InternalSelection)y).getCurrentNode()), buildList(internalLiteral(x),y), "sum");
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Create an expression that returns the sum of its arguments.
 * 
 * @param x
 *            expression
 * @param y
 *            expression
 * @return sum
 */
public <N extends Number> Expression<N> sum(Expression<? extends N> x, Expression<? extends N> y){
  return new FunctionExpressionImpl(this.metamodel, (Class<N>)BasicTypeHelperImpl.getInstance().extendedBinaryNumericPromotion(x.getJavaType(), y.getJavaType()), ExpressionMath.add(((InternalSelection)x).getCurrentNode(),((InternalSelection)y).getCurrentNode()), buildList(x,y), "sum");
}
/**
origin: org.eclipse.persistence/org.eclipse.persistence.core

if(queryType == bulk) {
  listOrderExpression = builder.getField(this.listOrderField).between(builder.getParameter(min), builder.getParameter(max));
  modifyRow.add(this.listOrderField, ExpressionMath.add(builder.getField(this.listOrderField), builder.getParameter(shift)));
} else {
  listOrderExpression = builder.getField(this.listOrderField).equal(builder.getParameter(min));
origin: com.haulmont.thirdparty/eclipselink

if(queryType == bulk) {
  listOrderExpression = builder.getField(this.listOrderField).between(builder.getParameter(min), builder.getParameter(max));
  modifyRow.add(this.listOrderField, ExpressionMath.add(builder.getField(this.listOrderField), builder.getParameter(shift)));
} else {
  listOrderExpression = builder.getField(this.listOrderField).equal(builder.getParameter(min));
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if(queryType == bulk) {
  listOrderExpression = builder.getField(this.listOrderField).between(builder.getParameter(min), builder.getParameter(max));
  modifyRow.add(this.listOrderField, ExpressionMath.add(builder.getField(this.listOrderField), builder.getParameter(shift)));
} else {
  listOrderExpression = builder.getField(this.listOrderField).equal(builder.getParameter(min));
org.eclipse.persistence.expressionsExpressionMathadd

Javadoc

PUBLIC: Return a new expression that applies the function to the given expression.

Popular methods of ExpressionMath

  • abs
    PUBLIC: Return a new expression that applies the function to the given expression.Example:> Exampl
  • atan2
    PUBLIC: Return a new expression that applies the function to the given expression.
  • divide
    PUBLIC: Return a new expression that applies the function to the given expression.
  • max
    PUBLIC: Return a new expression that applies the function to the given expression.
  • min
    PUBLIC: Return a new expression that applies the function to the given expression.
  • mod
    PUBLIC: Return a new expression that applies the function to the given expression.
  • multiply
    PUBLIC: Return a new expression that applies the function to the given expression.
  • power
    PUBLIC: Return a new expression that applies the function to the given expression.
  • round
    PUBLIC: Return a new expression that applies the function to the given expression.
  • subtract
    PUBLIC: Return a new expression that applies the function to the given expression.
  • trunc
    PUBLIC: Return a new expression that applies the function to the given expression.
  • sqrt
    PUBLIC: Return a new expression that applies the function to the given expression.
  • trunc,
  • sqrt,
  • negate

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Reference (javax.naming)
  • Github Copilot 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