com.caucho.ejb.cfg
Class EjbMethodPattern<X>

java.lang.Object
  extended by com.caucho.ejb.cfg.EjbMethodPattern<X>
Direct Known Subclasses:
AfterBeginMethod, BeforeCompletionMethod, ConcurrentMethod, PostConstructType, RemoveMethod

public class EjbMethodPattern<X>
extends java.lang.Object

Configuration for a method.


Field Summary
static int RESIN_DATABASE
           
static int RESIN_READ_ONLY
           
static int RESIN_ROW_LOCK
           
 
Constructor Summary
EjbMethodPattern()
          Creates a new method.
EjbMethodPattern(EjbBean<X> bean, MethodSignature signature)
          Creates a new method.
 
Method Summary
 void configure(AnnotatedMethod<?> apiMethod)
          Configures the bean with the override values
 boolean equals(java.lang.Object o)
          Returns true if these are equivalent.
 int getJDBCIsolation()
          Returns the JDBC isolation.
 java.lang.String getLocation()
          Returns the config location.
 java.lang.String getName()
          Returns the method name.
 java.lang.String getQuery()
          Returns the method's query.
 boolean getQueryLoadsBean()
          Returns true if the query method should load bean values.
 java.lang.String getQueryLocation()
          Returns the query config location.
 boolean getRelationLoadsBean()
          Returns true if the relation method should load bean values.
 int getResinIsolation()
          Returns the Resin isolation.
 java.util.ArrayList<java.lang.String> getRoles()
          Returns the roles allowed for the method.
 MethodSignature getSignature()
          Returns the method signature.
 TransactionAttributeType getTransactionType()
          Returns the method's transaction type, e.g.
 boolean isMatch(AnnotatedMethod<?> method)
           
 boolean isReadOnly()
          Returns true if the method does not set any values.
 void setBean(EjbBean<X> bean)
          Sets the bean.
 void setJDBCIsolation(int isolation)
          Sets the JDBC isolation.
 void setLocation(java.lang.String location)
          Sets the config location.
 void setQuery(java.lang.String query)
          Sets the method's query.
 void setQueryLoadsBean(boolean loadBean)
          Set true if the query method should load bean values.
 void setQueryLocation(java.lang.String location)
          Sets the query node.
 void setRelationLoadsBean(boolean loadBean)
          Set true if the relation method should load bean values.
 void setResinIsolation(java.lang.String isolation)
          Sets the Resin isolation.
 void setRoles(java.util.ArrayList<java.lang.String> roles)
          Set the roles allowed for the method.
 void setRoles(java.lang.String[] roles)
          Set the roles allowed for the method.
 void setSignature(MethodSignature sig)
          Sets the method signature.
 void setTransaction(TransactionAttributeType type)
           
 void setTransAttribute(java.lang.String type)
          Sets the method's transaction type, e.g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESIN_DATABASE

public static final int RESIN_DATABASE
See Also:
Constant Field Values

RESIN_READ_ONLY

public static final int RESIN_READ_ONLY
See Also:
Constant Field Values

RESIN_ROW_LOCK

public static final int RESIN_ROW_LOCK
See Also:
Constant Field Values
Constructor Detail

EjbMethodPattern

public EjbMethodPattern()
Creates a new method.


EjbMethodPattern

public EjbMethodPattern(EjbBean<X> bean,
                        MethodSignature signature)
Creates a new method.

Parameters:
entity - the owning entity bean.
signature - the method signature.
Method Detail

setBean

public void setBean(EjbBean<X> bean)
Sets the bean.


setLocation

public void setLocation(java.lang.String location)
Sets the config location.


getLocation

public java.lang.String getLocation()
Returns the config location.


setSignature

public void setSignature(MethodSignature sig)
Sets the method signature.


getSignature

public MethodSignature getSignature()
Returns the method signature.


getName

public java.lang.String getName()
Returns the method name.


isReadOnly

public boolean isReadOnly()
Returns true if the method does not set any values.


getResinIsolation

public int getResinIsolation()
Returns the Resin isolation.


setResinIsolation

public void setResinIsolation(java.lang.String isolation)
                       throws ConfigException
Sets the Resin isolation.

Throws:
ConfigException

getJDBCIsolation

public int getJDBCIsolation()
Returns the JDBC isolation.


setJDBCIsolation

public void setJDBCIsolation(int isolation)
Sets the JDBC isolation.


getQuery

public java.lang.String getQuery()
Returns the method's query.


setQuery

public void setQuery(java.lang.String query)
Sets the method's query.


getQueryLocation

public java.lang.String getQueryLocation()
Returns the query config location.


setQueryLocation

public void setQueryLocation(java.lang.String location)
Sets the query node.


getTransactionType

public TransactionAttributeType getTransactionType()
Returns the method's transaction type, e.g. Required.


setTransaction

public void setTransaction(TransactionAttributeType type)
                    throws ConfigException
Throws:
ConfigException

setTransAttribute

public void setTransAttribute(java.lang.String type)
                       throws ConfigException
Sets the method's transaction type, e.g. Required

Throws:
ConfigException

getQueryLoadsBean

public boolean getQueryLoadsBean()
Returns true if the query method should load bean values.


setQueryLoadsBean

public void setQueryLoadsBean(boolean loadBean)
Set true if the query method should load bean values.


getRelationLoadsBean

public boolean getRelationLoadsBean()
Returns true if the relation method should load bean values.


setRelationLoadsBean

public void setRelationLoadsBean(boolean loadBean)
Set true if the relation method should load bean values.


getRoles

public java.util.ArrayList<java.lang.String> getRoles()
Returns the roles allowed for the method.


setRoles

public void setRoles(java.util.ArrayList<java.lang.String> roles)
Set the roles allowed for the method.


setRoles

public void setRoles(java.lang.String[] roles)
Set the roles allowed for the method.


configure

public void configure(AnnotatedMethod<?> apiMethod)
Configures the bean with the override values


isMatch

public boolean isMatch(AnnotatedMethod<?> method)

equals

public boolean equals(java.lang.Object o)
Returns true if these are equivalent.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object