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

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

Best Java code snippets using org.eclipse.persistence.expressions.ExpressionMath.divide (Showing top 11 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 divide(Expression left, int right) {
  return divide(left, Integer.valueOf(right));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Return a new expression that applies the function to the given expression.
 */
public static Expression divide(Expression left, int right) {
  return divide(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 divide(Expression left, int right) {
  return divide(left, new Integer(right));
}
origin: com.haulmont.thirdparty/eclipselink

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

/**
 * {@inheritDoc}
 */
@Override
public void visit(DivisionExpression expression) {
  List<Class<?>> types = new ArrayList<Class<?>>(2);
  // Create the left side of the division expression
  expression.getLeftExpression().accept(this);
  Expression leftExpression = queryExpression;
  types.add(type[0]);
  // Create the right side of the division expression
  expression.getRightExpression().accept(this);
  Expression rightExpression = queryExpression;
  types.add(type[0]);
  // Now create the division expression
  queryExpression = ExpressionMath.divide(leftExpression, rightExpression);
  // Set the expression type
  Collections.sort(types, NumericTypeComparator.instance());
  type[0] = types.get(0);
}
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 .divide to the where clause returned from step 1
 * 3. Generate the expression for the right side and use it as the parameter for the .divide()
 * 4. Return the completed where clause to the caller
 */
public Expression generateExpression(GenerationContext context) {
  Expression whereClause = getLeft().generateExpression(context);
  whereClause = ExpressionMath.divide(whereClause, getRight().generateExpression(context));
  return whereClause;
}
origin: com.haulmont.thirdparty/eclipselink

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

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

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

/**
 * Create an expression that returns the quotient of its arguments.
 * 
 * @param x
 *            value
 * @param y
 *            expression
 * @return quotient
 */
public Expression<Number> quot(Number x, Expression<? extends Number> y){
  return new FunctionExpressionImpl(this.metamodel, ClassConstants.NUMBER, ExpressionMath.divide(new ConstantExpression(x, ((InternalSelection)y).getCurrentNode()),((InternalSelection)y).getCurrentNode()), buildList(internalLiteral(x),y), "quot");
}
org.eclipse.persistence.expressionsExpressionMathdivide

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
  • add
    PUBLIC: Return a new expression that applies the function to the given expression.
  • atan2
    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
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Reference (javax.naming)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for Android Studio
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