org.objectweb.jonas_ejb.deployment.api
Class MethodCmp2Desc

java.lang.Object
  extended by org.objectweb.jonas_ejb.deployment.api.MethodDesc
      extended by org.objectweb.jonas_ejb.deployment.api.MethodCmp2Desc

public class MethodCmp2Desc
extends MethodDesc

Class to hold meta-information related to CMP2 find/select methods

Author:
Christophe Ney [cney@batisseurs.com] : Initial developer, Helene Joanin

Field Summary
protected  EntityDesc entityDesc
           
protected  java.lang.String query
           
protected  ASTEJBQL queryNode
           
protected  EjbqlQueryTreeHolder queryTreeHolder
           
protected  boolean resultTypeMappingRemote
           
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.MethodDesc
APPLY_TO, APPLY_TO_BEAN, APPLY_TO_BEAN_METHOD, APPLY_TO_BEAN_METHOD_NAME, APPLY_TO_CLASS, APPLY_TO_CLASS_METHOD, APPLY_TO_CLASS_METHOD_NAME, APPLY_TO_NOTHING, beanDesc, TX_MANDATORY, TX_NEVER, TX_NOT_SET, TX_NOT_SUPPORTED, TX_NULL, TX_REQUIRED, TX_REQUIRES_NEW, TX_STR_DEFAULT_VALUE, TX_STR_DEFAULT_VALUE_4_MDB, TX_SUPPORTS
 
Method Summary
 boolean getPrefetch()
          Get the prefetch tag value for this method.
 java.lang.String getQuery()
          get EJB-QL query when defined
 EjbqlQueryTreeHolder getQueryTreeHolder(org.objectweb.jorm.api.PMapper mapper)
          return a query tree holder allowing evaluation of the query
 boolean isResultTypeMappingRemote()
          get result type mapping state (remote/local)
static java.lang.String queryMethodElementToString(QueryMethod m)
          String representation of the given element
 void setQuery(java.lang.String query)
          set EJB-QL query.
 void setResultTypeMapping(java.lang.String resultTypeMapping)
          set the state of resultTypeMappingRemote
 java.lang.String toString()
          String representation of the object for test purpose
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.MethodDesc
getBeanDesc, getIndex, getMethod, getRoleName, getTxAttribute, getTxAttributeName, getTxAttributeName, getTxAttributeStatus, isEjbSelect, isEjbSelect, isExcluded, isFindByPrimaryKey, isFindByPrimaryKey, isFinder, isFinder, matchPattern, matchPattern, methodElementToString, methodElementToString, setExcluded, setIndex, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

query

protected java.lang.String query

queryNode

protected ASTEJBQL queryNode

queryTreeHolder

protected EjbqlQueryTreeHolder queryTreeHolder

resultTypeMappingRemote

protected boolean resultTypeMappingRemote

entityDesc

protected EntityDesc entityDesc
Method Detail

getQuery

public java.lang.String getQuery()
get EJB-QL query when defined

Returns:
possibly null String containing the EJB-QL query for the method

setQuery

public void setQuery(java.lang.String query)
              throws ParseException
set EJB-QL query. Because of the deployment descriptor structure, the query is set after the object is created.

Throws:
ParseException

getQueryTreeHolder

public EjbqlQueryTreeHolder getQueryTreeHolder(org.objectweb.jorm.api.PMapper mapper)
                                        throws DeploymentDescException
return a query tree holder allowing evaluation of the query

Throws:
DeploymentDescException

isResultTypeMappingRemote

public boolean isResultTypeMappingRemote()
get result type mapping state (remote/local)

Returns:
true when remote

setResultTypeMapping

public void setResultTypeMapping(java.lang.String resultTypeMapping)
                          throws DeploymentDescException
set the state of resultTypeMappingRemote

Throws:
DeploymentDescException

getPrefetch

public boolean getPrefetch()
Get the prefetch tag value for this method. May be true only for finder methods (not for ejbSelect methods)


queryMethodElementToString

public static java.lang.String queryMethodElementToString(QueryMethod m)
String representation of the given element

Parameters:
m - an element
Returns:
String representation of the given element method

toString

public java.lang.String toString()
String representation of the object for test purpose

Overrides:
toString in class MethodDesc
Returns:
String representation of this object