org.datanucleus.store.mapped.expression
Interface ExpressionOperatorAdapter

All Known Subinterfaces:
DatastoreAdapter, RDBMSAdapter
All Known Implementing Classes:
DatabaseAdapter, DB2Adapter, DB2AS400Adapter, DerbyAdapter, FirebirdAdapter, H2Adapter, HSQLAdapter, InformixAdapter, McKoiAdapter, MSSQLServerAdapter, MySQLAdapter, OracleAdapter, PointbaseAdapter, PostgreSQLAdapter, SAPDBAdapter, SybaseAdapter

public interface ExpressionOperatorAdapter

Interface that allows one datastore adapt expression and operators

Version:
$Revision: 1.2 $

Method Summary
 ScalarExpression concatOperator(ScalarExpression operand1, ScalarExpression operand2)
           If only one operand expression is of type String, then string conversion is performed on the other operand to produce a string at run time.
 java.lang.String getOperatorConcat()
          An operator in a string expression that concatenates two or more character or binary strings, columns, or a combination of strings and column names into one expression (a string operator).
 NumericExpression modOperator(ScalarExpression operand1, ScalarExpression operand2)
          Method to generate a modulus expression.
 

Method Detail

modOperator

NumericExpression modOperator(ScalarExpression operand1,
                              ScalarExpression operand2)
Method to generate a modulus expression. The binary % operator is said to yield the remainder of its operands from an implied division; the left-hand operand is the dividend and the right-hand operand is the divisor.

Parameters:
operand1 - the left expression
operand2 - the right expression
Returns:
The Expression for modulus

concatOperator

ScalarExpression concatOperator(ScalarExpression operand1,
                                ScalarExpression operand2)

If only one operand expression is of type String, then string conversion is performed on the other operand to produce a string at run time. The result is a reference to a String object (newly created, unless the expression is a compile-time constant expression (15.28))that is the concatenation of the two operand strings. The characters of the left-hand operand precede the characters of the right-hand operand in the newly created string. If an operand of type String is null, then the string "null" is used instead of that operand. "null" is used instead of that operand.

Concatenates two or more character or binary strings, columns, or a combination of strings and column names into one expression (a string operator).

Parameters:
operand1 - the left expression
operand2 - the right expression
Returns:
The Expression for concatenation

getOperatorConcat

java.lang.String getOperatorConcat()
An operator in a string expression that concatenates two or more character or binary strings, columns, or a combination of strings and column names into one expression (a string operator).

Returns:
the operator String


Copyright © 2009. All Rights Reserved.