com.mysema.query.alias
Class AliasFactory

java.lang.Object
  extended by com.mysema.query.alias.AliasFactory

public class AliasFactory
extends Object

AliasFactory is a factory class for alias creation

Author:
tiwe

Constructor Summary
AliasFactory(PathFactory pathFactory, TypeSystem typeSystem)
           
 
Method Summary
<A> A
createAliasForExpr(Class<A> cl, Expression<? extends A> expr)
          Create an alias instance for the given class and Expression
<A> A
createAliasForProperty(Class<A> cl, Object parent, Expression<?> path)
          Create an alias instance for the given class, parent and path
<A> A
createAliasForVariable(Class<A> cl, String var)
          Create an alias instance for the given class and variable name
protected
<A> A
createProxy(Class<A> cl, Expression<?> path)
          Create a proxy instance for the given class and path
<A extends Expression<?>>
A
getCurrent()
          Get the current thread bound expression without reseting it
<A extends Expression<?>>
A
getCurrentAndReset()
          Get the current thread bound expression and reset it
 void reset()
          Reset the thread bound expression to null
 void setCurrent(Expression<?> expr)
          Set the thread bound expression to the given value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AliasFactory

public AliasFactory(PathFactory pathFactory,
                    TypeSystem typeSystem)
Method Detail

createAliasForExpr

public <A> A createAliasForExpr(Class<A> cl,
                                Expression<? extends A> expr)
Create an alias instance for the given class and Expression

Type Parameters:
A -
Parameters:
cl -
expr -
Returns:

createAliasForProperty

public <A> A createAliasForProperty(Class<A> cl,
                                    Object parent,
                                    Expression<?> path)
Create an alias instance for the given class, parent and path

Type Parameters:
A -
Parameters:
cl -
parent -
path -
Returns:

createAliasForVariable

public <A> A createAliasForVariable(Class<A> cl,
                                    String var)
Create an alias instance for the given class and variable name

Type Parameters:
A -
Parameters:
cl -
var -
Returns:

createProxy

protected <A> A createProxy(Class<A> cl,
                            Expression<?> path)
Create a proxy instance for the given class and path

Type Parameters:
A -
Parameters:
cl -
path -
Returns:

getCurrent

@Nullable
public <A extends Expression<?>> A getCurrent()
Get the current thread bound expression without reseting it

Type Parameters:
A -
Returns:

getCurrentAndReset

@Nullable
public <A extends Expression<?>> A getCurrentAndReset()
Get the current thread bound expression and reset it

Type Parameters:
A -
Returns:

reset

public void reset()
Reset the thread bound expression to null


setCurrent

public void setCurrent(Expression<?> expr)
Set the thread bound expression to the given value

Parameters:
expr -


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.