de.mguennewig.pobjects.metadata
Class CommandDecl

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Declaration
      extended by de.mguennewig.pobjects.metadata.CommandDecl
All Implemented Interfaces:
SqlStatement

public class CommandDecl
extends Declaration
implements SqlStatement

Declaration of an user supplied SQL command.

Author:
Michael Günnewig

Field Summary
 
Fields inherited from class de.mguennewig.pobjects.metadata.Declaration
ARGUMENT_CONSTRUCTOR, CLASS_NAME, DESCRIPTOR, GENERATED_CLASS_NAME, POINTER_TYPE, SQL_ARG_COLON, SQL_ARG_DOLLAR, SQL_ARG_NONE, SQL_ARG_QUESTION_MARK
 
Constructor Summary
CommandDecl(java.lang.String name, FormDecl input, java.lang.Object[] sql)
          Creates a new Command declaration.
 
Method Summary
 FormDecl getFormDecl()
           
 int getNumSqlStatementParts()
          Returns the number of SQL statement parts.
 java.lang.String getSqlCommandClause(int sqlArgVariant)
           
 java.lang.Object getSqlStatementPart(int n)
          Returns the nth part of the SQL statement.
 java.lang.String name(int variant)
          Returns different names depending on variant for the code generator.
 void setModule(Module module)
          Sets the owning module of this declaration.
 
Methods inherited from class de.mguennewig.pobjects.metadata.Declaration
getDescription, getModule, getName, setDescription, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandDecl

public CommandDecl(java.lang.String name,
                   FormDecl input,
                   java.lang.Object[] sql)
Creates a new Command declaration.

Method Detail

getFormDecl

public final FormDecl getFormDecl()

getSqlCommandClause

public final java.lang.String getSqlCommandClause(int sqlArgVariant)

getNumSqlStatementParts

public final int getNumSqlStatementParts()
Returns the number of SQL statement parts.

Specified by:
getNumSqlStatementParts in interface SqlStatement

getSqlStatementPart

public final java.lang.Object getSqlStatementPart(int n)
Returns the nth part of the SQL statement.

Specified by:
getSqlStatementPart in interface SqlStatement

setModule

public void setModule(Module module)
Sets the owning module of this declaration.

Overrides:
setModule in class Declaration

name

public java.lang.String name(int variant)
Returns different names depending on variant for the code generator.

Specified by:
name in interface SqlStatement
Specified by:
name in class Declaration
Returns:
variant return value
Declaration.DESCRIPTOR commandDesc
Declaration.POINTER_TYPE <JavaPackage>.<Name>
Declaration.CLASS_NAME <Name>
Declaration.GENERATED_CLASS_NAME PClass<Name>
Declaration.ARGUMENT_CONSTRUCTOR name>Args