Extension SDK 9.0.5

oracle.jdeveloper.webservices.util
Class ProgramUnit

java.lang.Object
  extended byoracle.jdeveloper.webservices.util.ProgramUnit

public class ProgramUnit
extends java.lang.Object

ProgramUnit is a data model that stores a description of a PL/SQL program unit. It stores the program unit name and its return type and parameters.


Constructor Summary
ProgramUnit()
          Default constructor provided to support Object2Dom marshalling.
ProgramUnit(java.lang.String name, Parameter[] parameters, Parameter returns)
          Create a new program unit description.
 
Method Summary
 boolean canBePublished(oracle.jdevimpl.webservices.util.PLSQLJavaTypeMap plsqlToJava, oracle.jdevimpl.webservices.util.JavaXSDTypeMap javaToXSD, java.util.Map typesValidated)
          Decide whether the program unit has parameters that allow it to be published.
 boolean equals(java.lang.Object o2)
           
 java.lang.String getName()
           
 Parameter[] getParameters()
           
 Parameter getReturn()
           
 java.lang.String getSignature()
          Create a string containing the PL/SQL signature of the program unit.
 java.lang.String getWhyNotReason()
           
static ProgramUnit parse(java.lang.String sig)
          Parse the supplied string and create a ProgramUnit from it.
 void setCanBePublished(boolean canBePublished)
          Control whether or not the program unit can be published.
 void setName(java.lang.String name)
          Accessor method provided to support Object2Dom marshalling.
 void setParameters(Parameter[] parameters)
          Accessor method provided to support Object2Dom marshalling.
 void setReturn(Parameter returns)
          Accessor method provided to support Object2Dom marshalling.
 void setWhyNotReason(java.lang.String whyNotReason)
          Set the reason why a program unit can't be published.
 boolean xsdSignaturesMatch(ProgramUnit other, oracle.jdevimpl.webservices.util.PLSQLJavaTypeMap plsqlToJava, oracle.jdevimpl.webservices.util.JavaXSDTypeMap javaToXSD)
          Determine whether this program unit and the program unit supplied have the same signature when mapped down into XSD types.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramUnit

public ProgramUnit()
Default constructor provided to support Object2Dom marshalling. DO NOT USE UNDER ANY OTHER CIRCUMSTANCES.


ProgramUnit

public ProgramUnit(java.lang.String name,
                   Parameter[] parameters,
                   Parameter returns)
Create a new program unit description.

Parameters:
name - Name of the program unit.
parameters - Array of Parameter objects representing the parameters of the program unit. Null is accepted if the program unit has no parameters.
returns - Parameter object representing the return type of the program unit if it is a function. Null is accepted if the program unit is a procedure.
Method Detail

setName

public void setName(java.lang.String name)
Accessor method provided to support Object2Dom marshalling. DO NOT USE UNDER ANY OTHER CIRCUMSTANCES.


getName

public java.lang.String getName()
Returns:
The name of the program unit.

setParameters

public void setParameters(Parameter[] parameters)
Accessor method provided to support Object2Dom marshalling. DO NOT USE UNDER ANY OTHER CIRCUMSTANCES.


getParameters

public Parameter[] getParameters()
Returns:
Array of Parameter objects representing the input parameters to the program unit. Will return null if the program unit has no input parameters.

setReturn

public void setReturn(Parameter returns)
Accessor method provided to support Object2Dom marshalling. DO NOT USE UNDER ANY OTHER CIRCUMSTANCES.


getReturn

public Parameter getReturn()
Returns:
Parameter object representing the result type returned by the program unit if it is a function. Will return null if the program unit is a procedure.

canBePublished

public boolean canBePublished(oracle.jdevimpl.webservices.util.PLSQLJavaTypeMap plsqlToJava,
                              oracle.jdevimpl.webservices.util.JavaXSDTypeMap javaToXSD,
                              java.util.Map typesValidated)
                       throws java.sql.SQLException
Decide whether the program unit has parameters that allow it to be published.

Parameters:
plsqlToJava - Type map from PL/SQL types to Java types.
typesValidated - Map of PL/SQL user types that have previously been validated, to save us re-calculating results we already know.
Throws:
java.sql.SQLException - if type-checking on object types fails due to a problem on the database.

setCanBePublished

public void setCanBePublished(boolean canBePublished)
Control whether or not the program unit can be published.

Parameters:
canBePublished - Boolean value, true if the program unit should be allowed to be published, false otherwise.

getWhyNotReason

public java.lang.String getWhyNotReason()
Returns:
The reason why a program unit that can't be published can't be published. Will be null if the program unit can be published.

setWhyNotReason

public void setWhyNotReason(java.lang.String whyNotReason)
Set the reason why a program unit can't be published. Setting this to null removes a previous reason.

Parameters:
whyNotReason - The new reason why the program unit can't be published.
Throws:
java.lang.IllegalStateException - if the reason why is removed from a program unit that can never be published.

getSignature

public java.lang.String getSignature()
Create a string containing the PL/SQL signature of the program unit.


equals

public boolean equals(java.lang.Object o2)

xsdSignaturesMatch

public boolean xsdSignaturesMatch(ProgramUnit other,
                                  oracle.jdevimpl.webservices.util.PLSQLJavaTypeMap plsqlToJava,
                                  oracle.jdevimpl.webservices.util.JavaXSDTypeMap javaToXSD)
Determine whether this program unit and the program unit supplied have the same signature when mapped down into XSD types.

Parameters:
other - Program unit to compare with.
plsqlToJava - Type map from PL/SQL types to Java types.
Returns:
True if the signatures match in XSD, false otherwise.

parse

public static ProgramUnit parse(java.lang.String sig)
Parse the supplied string and create a ProgramUnit from it.

Parameters:
sig - String containing the signature to parse.
Returns:
ProgramUnit created from string, null if string didn't parse correctly.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.