org.apache.openjpa.persistence.query
Class UnaryOperatorExpression

java.lang.Object
  extended by org.apache.openjpa.persistence.query.AbstractVisitable
      extended by org.apache.openjpa.persistence.query.ExpressionImpl
          extended by org.apache.openjpa.persistence.query.UnaryOperatorExpression
All Implemented Interfaces:
Serializable, Aggregate, Expression, OrderByItem, PredicateOperand, SelectItem, Visitable
Direct Known Subclasses:
AbsExpression, AnyExpression, AverageExpression, ConcatExpression, CountExpression, DistinctExpression, IndexExpression, LengthExpression, LowerExpression, MaxExpression, MinExpression, QueryExpression, SizeExpression, SomeExpression, SquareRootExpression, SubStringExpression, SumExpression, TrimExpression, TypeExpression, UnaryMinusExpression, UpperExpression

 class UnaryOperatorExpression
extends ExpressionImpl
implements Aggregate


Field Summary
protected  Expression _e
           
protected  UnaryFunctionalOperator _op
           
 
Fields inherited from class org.apache.openjpa.persistence.query.AbstractVisitable
CLOSE_BRACE, COMMA, EMPTY, OPEN_BRACE, SPACE
 
Constructor Summary
UnaryOperatorExpression(Expression e, UnaryFunctionalOperator op)
           
 
Method Summary
 String asExpression(AliasContext ctx)
          Get a JPQL fragment as used in WHERE clause.
 String asProjection(AliasContext ctx)
          Gets the string representation in SELECT projection.
 Expression distinct()
          Specify that duplicates are to be removed before the aggregate operation is invoked.
 Expression getOperand()
           
 UnaryFunctionalOperator getOperator()
           
 
Methods inherited from class org.apache.openjpa.persistence.query.ExpressionImpl
abs, asc, between, between, between, between, between, between, between, between, between, between, between, between, between, concat, concat, desc, dividedBy, dividedBy, equal, equal, equal, equal, equal, equal, equal, equal, getAliasHint, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, in, in, in, in, in, in, isNull, length, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, locate, locate, locate, locate, locate, locate, lower, member, minus, minus, minus, mod, mod, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, plus, plus, sqrt, substring, substring, substring, substring, substring, substring, times, times, trim, trim, trim, trim, trim, trim, upper
 
Methods inherited from class org.apache.openjpa.persistence.query.AbstractVisitable
asJoinable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.persistence.query.Expression
abs, concat, concat, dividedBy, dividedBy, in, in, in, in, in, in, isNull, length, locate, locate, locate, locate, locate, locate, lower, member, minus, minus, minus, mod, mod, plus, plus, sqrt, substring, substring, substring, substring, substring, substring, times, times, trim, trim, trim, trim, trim, trim, upper
 
Methods inherited from interface org.apache.openjpa.persistence.query.SelectItem
asc, desc
 
Methods inherited from interface org.apache.openjpa.persistence.query.PredicateOperand
between, between, between, between, between, between, between, between, between, between, between, between, between, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual
 
Methods inherited from interface org.apache.openjpa.persistence.query.Visitable
asJoinable
 

Field Detail

_e

protected final Expression _e

_op

protected final UnaryFunctionalOperator _op
Constructor Detail

UnaryOperatorExpression

public UnaryOperatorExpression(Expression e,
                               UnaryFunctionalOperator op)
Method Detail

getOperand

public Expression getOperand()

getOperator

public UnaryFunctionalOperator getOperator()

distinct

public Expression distinct()
Description copied from interface: Aggregate
Specify that duplicates are to be removed before the aggregate operation is invoked.

Specified by:
distinct in interface Aggregate

asExpression

public String asExpression(AliasContext ctx)
Description copied from interface: Visitable
Get a JPQL fragment as used in WHERE clause.

Specified by:
asExpression in interface Visitable
Overrides:
asExpression in class AbstractVisitable

asProjection

public String asProjection(AliasContext ctx)
Description copied from interface: Visitable
Gets the string representation in SELECT projection.

Specified by:
asProjection in interface Visitable
Overrides:
asProjection in class AbstractVisitable


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.