org.apache.openjpa.persistence.query
Class OrPredicate

java.lang.Object
  extended by org.apache.openjpa.persistence.query.LogicalPredicate
      extended by org.apache.openjpa.persistence.query.OrPredicate
All Implemented Interfaces:
java.io.Serializable, Predicate, Visitable

public class OrPredicate
extends LogicalPredicate

Denotes (e1 OR e2) predicate.

Author:
Pinaki Poddar
See Also:
Serialized Form

Field Summary
static java.lang.String CLOSE_BRACE
           
static java.lang.String COMMA
           
static java.lang.String EMPTY
           
static java.lang.String OPEN_BRACE
           
static java.lang.String SPACE
           
 
Constructor Summary
OrPredicate(Predicate p1, Predicate p2)
           
 
Method Summary
 java.lang.String asJoinable(org.apache.openjpa.persistence.query.AliasContext ctx)
          Gets the string representation in FROM clause.
 java.lang.String asProjection(org.apache.openjpa.persistence.query.AliasContext ctx)
          Gets the string representation in SELECT projection.
 java.lang.String getAliasHint(org.apache.openjpa.persistence.query.AliasContext ctx)
          Gets the hint to be used while creating alias.
 
Methods inherited from class org.apache.openjpa.persistence.query.LogicalPredicate
and, asExpression, not, or
 
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.Visitable
asJoinable, asProjection, getAliasHint
 

Field Detail

SPACE

public static final java.lang.String SPACE
See Also:
Constant Field Values

OPEN_BRACE

public static final java.lang.String OPEN_BRACE
See Also:
Constant Field Values

CLOSE_BRACE

public static final java.lang.String CLOSE_BRACE
See Also:
Constant Field Values

COMMA

public static final java.lang.String COMMA
See Also:
Constant Field Values

EMPTY

public static final java.lang.String EMPTY
See Also:
Constant Field Values
Constructor Detail

OrPredicate

public OrPredicate(Predicate p1,
                   Predicate p2)
Method Detail

asProjection

public java.lang.String asProjection(org.apache.openjpa.persistence.query.AliasContext ctx)
Description copied from interface: Visitable
Gets the string representation in SELECT projection.

Specified by:
asProjection in interface Visitable

getAliasHint

public java.lang.String getAliasHint(org.apache.openjpa.persistence.query.AliasContext ctx)
Description copied from interface: Visitable
Gets the hint to be used while creating alias.

Specified by:
getAliasHint in interface Visitable

asJoinable

public java.lang.String asJoinable(org.apache.openjpa.persistence.query.AliasContext ctx)
Description copied from interface: Visitable
Gets the string representation in FROM clause.

Specified by:
asJoinable in interface Visitable