org.apache.openjpa.persistence.query
Class NewInstance

java.lang.Object
  extended by org.apache.openjpa.persistence.query.AbstractVisitable
      extended by org.apache.openjpa.persistence.query.NewInstance
All Implemented Interfaces:
Serializable, OrderByItem, SelectItem, Visitable

public class NewInstance
extends AbstractVisitable
implements SelectItem, Visitable

Denotes NEW fully.qualified.class.name(arg1, arg2,...)

Author:
Pinaki Poddar
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.openjpa.persistence.query.AbstractVisitable
CLOSE_BRACE, COMMA, EMPTY, OPEN_BRACE, SPACE
 
Constructor Summary
NewInstance(Class cls, SelectItem... args)
           
 
Method Summary
 OrderByItem asc()
          Return an OrderByItem referencing the SelectItem and specifying ascending ordering.
 String asProjection(AliasContext ctx)
          Gets the string representation in SELECT projection.
 OrderByItem desc()
          Return an OrderByItem referencing the SelectItem and specifying descending ordering.
 
Methods inherited from class org.apache.openjpa.persistence.query.AbstractVisitable
asExpression, asJoinable, getAliasHint
 
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
asExpression, asJoinable, getAliasHint
 

Constructor Detail

NewInstance

NewInstance(Class cls,
            SelectItem... args)
Method Detail

asc

public OrderByItem asc()
Description copied from interface: SelectItem
Return an OrderByItem referencing the SelectItem and specifying ascending ordering. The SelectItem must correspond to an orderable value.

Specified by:
asc in interface SelectItem
Returns:
order-by item

desc

public OrderByItem desc()
Description copied from interface: SelectItem
Return an OrderByItem referencing the SelectItem and specifying descending ordering. The SelectItem must correspond to an orderable value.

Specified by:
desc in interface SelectItem
Returns:
order-by item

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-2011 Apache Software Foundation. All Rights Reserved.