de.mathema.pride.util
Class StoredProcedureGenerator

java.lang.Object
  extended by de.mathema.pride.util.StoredProcedureGenerator

public class StoredProcedureGenerator
extends java.lang.Object

Generator for stored procedure access classes. This generator works for Oracle databases only, due to the vendor-specific structure of SP meta data.

Author:
Jan Lessner

Field Summary
protected  java.lang.String cls
           
protected static java.lang.String IN
           
protected static java.lang.String INOUT
           
protected static java.lang.String OUT
           
protected  java.lang.String pack
           
protected  java.lang.String proc
           
static java.lang.String REVISION_ID
           
 
Constructor Summary
StoredProcedureGenerator(java.lang.String[] args)
           
 
Method Summary
static void error(java.lang.String message)
           
 void generate()
           
 void generateClassHeader(java.io.PrintStream out)
           
 void generateClassTrailer(java.io.PrintStream out)
           
 void generateCtor(java.io.PrintStream out)
           
 void generateMember(java.io.PrintStream out, java.lang.String name, java.lang.String io, java.lang.String type, java.lang.Long length)
           
 void generateMembers(java.io.PrintStream out)
           
 void generateName(java.io.PrintStream out)
           
 void generatePackageAndImports(java.io.PrintStream out)
           
static void help()
           
static void main(java.lang.String[] args)
           
protected  java.lang.String[] memberExcludeList()
           
 java.lang.String sql2javaMember(java.lang.String name)
           
 java.lang.String sql2javaType(java.lang.String sqltype, java.lang.Long length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IN

protected static final java.lang.String IN
See Also:
Constant Field Values

OUT

protected static final java.lang.String OUT
See Also:
Constant Field Values

INOUT

protected static final java.lang.String INOUT
See Also:
Constant Field Values

pack

protected java.lang.String pack

proc

protected java.lang.String proc

cls

protected java.lang.String cls

REVISION_ID

public static final java.lang.String REVISION_ID
See Also:
Constant Field Values
Constructor Detail

StoredProcedureGenerator

public StoredProcedureGenerator(java.lang.String[] args)
                         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

memberExcludeList

protected java.lang.String[] memberExcludeList()

generatePackageAndImports

public void generatePackageAndImports(java.io.PrintStream out)

generateClassHeader

public void generateClassHeader(java.io.PrintStream out)

sql2javaType

public java.lang.String sql2javaType(java.lang.String sqltype,
                                     java.lang.Long length)
                              throws java.lang.Exception
Throws:
java.lang.Exception

sql2javaMember

public java.lang.String sql2javaMember(java.lang.String name)

generateMember

public void generateMember(java.io.PrintStream out,
                           java.lang.String name,
                           java.lang.String io,
                           java.lang.String type,
                           java.lang.Long length)
                    throws java.lang.Exception
Throws:
java.lang.Exception

generateMembers

public void generateMembers(java.io.PrintStream out)
                     throws java.lang.Exception
Throws:
java.lang.Exception

generateName

public void generateName(java.io.PrintStream out)

generateCtor

public void generateCtor(java.io.PrintStream out)

generateClassTrailer

public void generateClassTrailer(java.io.PrintStream out)

generate

public void generate()
              throws java.lang.Exception
Throws:
java.lang.Exception

error

public static void error(java.lang.String message)

help

public static void help()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception