de.ispsoft.jaxme.generator
Class BeanWriter

java.lang.Object
  extended byde.ispsoft.jaxme.generator.ConfigurableImpl
      extended byde.ispsoft.jaxme.generator.SourceWriterImpl
          extended byde.ispsoft.jaxme.generator.BeanWriter
All Implemented Interfaces:
Configurable, SourceWriter

public class BeanWriter
extends SourceWriterImpl

A subclass of the JavaSourceGenerator which generates EJB Entity beans with bean managed persistence.

Author:
Jochen Wiedmann

Field Summary
protected static org.xml.sax.Attributes emptyAttributes
           
 
Fields inherited from class de.ispsoft.jaxme.generator.SourceWriterImpl
directory, generator, javaPackage
 
Constructor Summary
BeanWriter()
          Creates a new instance of BeanGenerator
 
Method Summary
protected  java.lang.String generateEjbJar(Schema pSchema)
          Generates an ejb-jar file for the generated beans.
static void generateEjbJarElement(org.xml.sax.ContentHandler pHandler, java.lang.String pName, java.lang.String pValue)
          Generates a single, atomic element in the ejb-jar file.
protected  BeanClassWriter getBeanClassWriter(SchemaElement pElement)
          Returns a BeanClassWriter for the given element.
 void write(Schema pSchema)
          Called for writing a complete schema.
 void write(SchemaElement pElement)
          Called for writing a single schema element.
 
Methods inherited from class de.ispsoft.jaxme.generator.SourceWriterImpl
getDirectory, getGenerator, getJavaPackage, getOption, getSchemaDate, newJavaSource, setDirectory, setGenerator, setJavaPackage, setSchemaDate, writeFile, writeJavaSourceFile
 
Methods inherited from class de.ispsoft.jaxme.generator.ConfigurableImpl
getOption, getOptions, getOptionValue, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.ispsoft.jaxme.generator.Configurable
getOption, getOptions, getOptionValue, setOption
 

Field Detail

emptyAttributes

protected static final org.xml.sax.Attributes emptyAttributes
Constructor Detail

BeanWriter

public BeanWriter()
Creates a new instance of BeanGenerator

Method Detail

getBeanClassWriter

protected BeanClassWriter getBeanClassWriter(SchemaElement pElement)

Returns a BeanClassWriter for the given element.


generateEjbJarElement

public static void generateEjbJarElement(org.xml.sax.ContentHandler pHandler,
                                         java.lang.String pName,
                                         java.lang.String pValue)
                                  throws org.xml.sax.SAXException

Generates a single, atomic element in the ejb-jar file.

Throws:
org.xml.sax.SAXException

generateEjbJar

protected java.lang.String generateEjbJar(Schema pSchema)
                                   throws java.lang.Exception

Generates an ejb-jar file for the generated beans.

Throws:
java.lang.Exception

write

public void write(SchemaElement pElement)
           throws java.lang.Exception

Called for writing a single schema element.

Specified by:
write in interface SourceWriter
Specified by:
write in class SourceWriterImpl
Throws:
java.lang.Exception

write

public void write(Schema pSchema)
           throws java.lang.Exception

Called for writing a complete schema. Concrete subclasses must implement this method.

Specified by:
write in interface SourceWriter
Overrides:
write in class SourceWriterImpl
Throws:
java.lang.Exception