FileDocCategorySizeDatePackage
InMemoryQueryIndirectionPolicy.javaAPI DocGlassfish v2 API4351Tue May 22 16:54:50 BST 2007oracle.toplink.essentials.queryframework

InMemoryQueryIndirectionPolicy

public class InMemoryQueryIndirectionPolicy extends Object implements Serializable

Purpose: Used to provide the user with a means of contoling the behaviour of in memory queries that access un-instantiated indirection in the query..

Description: This class contains a state variable that is used to determine what a query should do when accesing un-instantiated indirection. Use use this policy access the policy of a query set the policy behaviour using the methods below. All read queries have the policy set to throw exception by default

author
Gordon Yorke
since
TopLink/Java 3.6.3

Fields Summary
public static final int
SHOULD_THROW_INDIRECTION_EXCEPTION
public static final int
SHOULD_TRIGGER_INDIRECTION
public static final int
SHOULD_IGNORE_EXCEPTION_RETURN_CONFORMED
public static final int
SHOULD_IGNORE_EXCEPTION_RETURN_NOT_CONFORMED
protected int
policy
Constructors Summary
public InMemoryQueryIndirectionPolicy()


      
        this.policy = SHOULD_THROW_INDIRECTION_EXCEPTION;
    
public InMemoryQueryIndirectionPolicy(int policyValue)

        this.policy = policyValue;
    
Methods Summary
public intgetPolicy()

        return this.policy;
    
public voidignoreIndirectionExceptionReturnConformed()

        this.policy = SHOULD_IGNORE_EXCEPTION_RETURN_CONFORMED;
    
public voidignoreIndirectionExceptionReturnNotConformed()

        this.policy = SHOULD_IGNORE_EXCEPTION_RETURN_NOT_CONFORMED;
    
public voidsetPolicy(int policy)

        this.policy = policy;
    
public booleanshouldIgnoreIndirectionExceptionReturnConformed()

        return this.policy == SHOULD_IGNORE_EXCEPTION_RETURN_CONFORMED;
    
public booleanshouldIgnoreIndirectionExceptionReturnNotConformed()

        return this.policy == SHOULD_IGNORE_EXCEPTION_RETURN_NOT_CONFORMED;
    
public booleanshouldThrowIndirectionException()

        return this.policy == SHOULD_THROW_INDIRECTION_EXCEPTION;
    
public booleanshouldTriggerIndirection()

        return this.policy == SHOULD_TRIGGER_INDIRECTION;
    
public voidthrowIndirectionException()

        this.policy = SHOULD_THROW_INDIRECTION_EXCEPTION;
    
public voidtriggerIndirection()

        this.policy = SHOULD_TRIGGER_INDIRECTION;