Added as().
This commit is contained in:
@@ -51,6 +51,16 @@ public class ColumnExp
|
|||||||
this.name = field;
|
this.name = field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a column expression for the supplied persistent class with the same name as this
|
||||||
|
* expression. This is useful for "casting" a column expression from a parent class to a
|
||||||
|
* derived class.
|
||||||
|
*/
|
||||||
|
public ColumnExp as (Class<? extends PersistentRecord> oClass)
|
||||||
|
{
|
||||||
|
return new ColumnExp(oClass, name);
|
||||||
|
}
|
||||||
|
|
||||||
// from SQLExpression
|
// from SQLExpression
|
||||||
public Object accept (ExpressionVisitor<?> builder)
|
public Object accept (ExpressionVisitor<?> builder)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user