de.ispsoft.jaxme.generator.beanwriter
Class SessionBeanClassWriter

java.lang.Object
  extended byde.ispsoft.jaxme.generator.beanwriter.EntityBeanClassWriter
      extended byde.ispsoft.jaxme.generator.beanwriter.SessionBeanClassWriter
All Implemented Interfaces:
BeanClassWriter

public class SessionBeanClassWriter
extends EntityBeanClassWriter

Used by the BeanWriter to generate session beans.

Author:
Jochen Wiedmann

Field Summary
 
Fields inherited from class de.ispsoft.jaxme.generator.beanwriter.EntityBeanClassWriter
element, emptyAttributes, sourceWriter
 
Constructor Summary
SessionBeanClassWriter(SourceWriterImpl pSourceWriter, SchemaComplexElement pElement)
          Creates a new instance of SessionBeanWriter
 
Method Summary
protected  JavaField generateContextField(JavaSource js)
          Generates the context field.
protected  JavaMethod generateCreateMethod(JavaSource js)
          Generates the create() method.
protected  JavaMethod generateEjbLoadMethod(JavaSource js)
          Generates the ejbLoad() method.
protected  JavaMethod generateEjbPostCreateMethod(JavaSource js)
          Generates the ejbPostCreate() method.
protected  JavaMethod generateEjbRemoveMethod(JavaSource js)
          Generates the ejbRemove() method.
protected  JavaMethod generateEjbStoreMethod(JavaSource js)
          Generates the ejbStore() method.
protected  JavaField generateElementField(JavaSource js)
          Generates the element field.
protected  JavaMethod generateFindByPrimaryKeyMethod(JavaSource js)
          Generates the findByPrimaryKey() method.
protected  JavaMethod generateFindByQueryFourArgsMethod(JavaSource js)
          Generates the findByQuery() method with four arguments.
protected  JavaMethod generateFindByQueryOneArgMethod(JavaSource js)
          Generates the findByQuery() method with one argument.
protected  JavaMethod generateFindByQueryThreeArgsMethod(JavaSource js)
          Generates the findByQuery() method with three arguments.
protected  JavaMethod generateFindByQueryTwoArgsMethod(JavaSource js)
          Generates the findByQuery() method with two arguments.
protected  JavaMethod generateGetXMLMethod(JavaSource js)
          Generates the getXML() method.
protected  JavaMethod generateIsModifiedMethod(JavaSource js)
          Generates the isModified() method.
 JavaSource generatePrimaryKey()
          Generates the primary key class.
protected  JavaMethod generateSetContextMethod(JavaSource js)
          Generates the setEntityContext() method.
protected  JavaMethod generateUnsetContextMethod(JavaSource js)
          Generates the unsetEntityContext() method.
protected  JavaMethod generateUpdateMethod(JavaSource js)
          Generates the update() method.
protected  java.lang.String[] getBeanImplementsClass()
          Generates the interface, that the bean class implements.
protected  JdbcListMethod[] getBeanListMethods()
           
protected  java.lang.String getBeanName()
          Returns the beans name for resource references.
protected  JdbcListMethod[] getHomeListMethods()
           
protected  JavaMethod getListMethod(JavaSource pJs, JdbcListMethod pMethod)
           
protected  JdbcListMethod[] getRemoteListMethods()
           
 void writeEntityDeclaration(org.xml.sax.ContentHandler pHandler)
          Writes an entity bean declaration in the ejb-jar file.
 
Methods inherited from class de.ispsoft.jaxme.generator.beanwriter.EntityBeanClassWriter
generateBean, generateBeanClassInitializer, generateEjbActivateMethod, generateEjbPassivateMethod, generateHome, generatePrimaryKeyEquals, generatePrimaryKeyQuery, generatePrimaryKeyQueryPlaceHolders, generatePrimaryKeyResult, generatePrimaryKeyToString, generateRemote, getBeanClassName, getDataSourceName, getDeclaredBeanClassName, getDeclaredHomeClassName, getDeclaredPrimaryKeyClassName, getDeclaredRemoteClassName, getEJBException, getHomeClassName, getImplDeclaresRemoteException, getKeyList, getKeyList, getPrimaryKeyClassName, getRemoteClassName, writeContainerTransactionDeclaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionBeanClassWriter

public SessionBeanClassWriter(SourceWriterImpl pSourceWriter,
                              SchemaComplexElement pElement)
Creates a new instance of SessionBeanWriter

Method Detail

getBeanName

protected java.lang.String getBeanName()

Returns the beans name for resource references.

Overrides:
getBeanName in class EntityBeanClassWriter

generateCreateMethod

protected JavaMethod generateCreateMethod(JavaSource js)

Generates the create() method.

Overrides:
generateCreateMethod in class EntityBeanClassWriter

generateEjbPostCreateMethod

protected JavaMethod generateEjbPostCreateMethod(JavaSource js)

Generates the ejbPostCreate() method.

Overrides:
generateEjbPostCreateMethod in class EntityBeanClassWriter

generateFindByPrimaryKeyMethod

protected JavaMethod generateFindByPrimaryKeyMethod(JavaSource js)

Generates the findByPrimaryKey() method.

Overrides:
generateFindByPrimaryKeyMethod in class EntityBeanClassWriter

generateFindByQueryOneArgMethod

protected JavaMethod generateFindByQueryOneArgMethod(JavaSource js)

Generates the findByQuery() method with one argument.

Overrides:
generateFindByQueryOneArgMethod in class EntityBeanClassWriter

generateFindByQueryTwoArgsMethod

protected JavaMethod generateFindByQueryTwoArgsMethod(JavaSource js)

Generates the findByQuery() method with two arguments.

Overrides:
generateFindByQueryTwoArgsMethod in class EntityBeanClassWriter

generateFindByQueryThreeArgsMethod

protected JavaMethod generateFindByQueryThreeArgsMethod(JavaSource js)

Generates the findByQuery() method with three arguments.

Overrides:
generateFindByQueryThreeArgsMethod in class EntityBeanClassWriter

generateFindByQueryFourArgsMethod

protected JavaMethod generateFindByQueryFourArgsMethod(JavaSource js)

Generates the findByQuery() method with four arguments.

Overrides:
generateFindByQueryFourArgsMethod in class EntityBeanClassWriter

generateGetXMLMethod

protected JavaMethod generateGetXMLMethod(JavaSource js)

Generates the getXML() method.

Overrides:
generateGetXMLMethod in class EntityBeanClassWriter

generateUpdateMethod

protected JavaMethod generateUpdateMethod(JavaSource js)

Generates the update() method.

Overrides:
generateUpdateMethod in class EntityBeanClassWriter

generateEjbStoreMethod

protected JavaMethod generateEjbStoreMethod(JavaSource js)

Generates the ejbStore() method.

Overrides:
generateEjbStoreMethod in class EntityBeanClassWriter

generateEjbLoadMethod

protected JavaMethod generateEjbLoadMethod(JavaSource js)

Generates the ejbLoad() method.

Overrides:
generateEjbLoadMethod in class EntityBeanClassWriter

generateEjbRemoveMethod

protected JavaMethod generateEjbRemoveMethod(JavaSource js)

Generates the ejbRemove() method.

Overrides:
generateEjbRemoveMethod in class EntityBeanClassWriter

generateSetContextMethod

protected JavaMethod generateSetContextMethod(JavaSource js)

Generates the setEntityContext() method.

Overrides:
generateSetContextMethod in class EntityBeanClassWriter

generateUnsetContextMethod

protected JavaMethod generateUnsetContextMethod(JavaSource js)

Generates the unsetEntityContext() method.

Overrides:
generateUnsetContextMethod in class EntityBeanClassWriter

generateIsModifiedMethod

protected JavaMethod generateIsModifiedMethod(JavaSource js)

Generates the isModified() method.

Overrides:
generateIsModifiedMethod in class EntityBeanClassWriter

generateContextField

protected JavaField generateContextField(JavaSource js)

Generates the context field.

Overrides:
generateContextField in class EntityBeanClassWriter

generateElementField

protected JavaField generateElementField(JavaSource js)

Generates the element field.

Overrides:
generateElementField in class EntityBeanClassWriter

getBeanImplementsClass

protected java.lang.String[] getBeanImplementsClass()

Generates the interface, that the bean class implements.

Overrides:
getBeanImplementsClass in class EntityBeanClassWriter

generatePrimaryKey

public JavaSource generatePrimaryKey()

Generates the primary key class.

Specified by:
generatePrimaryKey in interface BeanClassWriter
Overrides:
generatePrimaryKey in class EntityBeanClassWriter

writeEntityDeclaration

public void writeEntityDeclaration(org.xml.sax.ContentHandler pHandler)
                            throws org.xml.sax.SAXException

Writes an entity bean declaration in the ejb-jar file.

Specified by:
writeEntityDeclaration in interface BeanClassWriter
Overrides:
writeEntityDeclaration in class EntityBeanClassWriter
Throws:
org.xml.sax.SAXException

getBeanListMethods

protected JdbcListMethod[] getBeanListMethods()
Overrides:
getBeanListMethods in class EntityBeanClassWriter

getHomeListMethods

protected JdbcListMethod[] getHomeListMethods()
Overrides:
getHomeListMethods in class EntityBeanClassWriter

getRemoteListMethods

protected JdbcListMethod[] getRemoteListMethods()
Overrides:
getRemoteListMethods in class EntityBeanClassWriter

getListMethod

protected JavaMethod getListMethod(JavaSource pJs,
                                   JdbcListMethod pMethod)
                            throws SchemaException
Overrides:
getListMethod in class EntityBeanClassWriter
Throws:
SchemaException