oracle.forms.jdapi
Class PlsqlModule

java.lang.Object
  |
  +--oracle.forms.jdapi.BaseFormsObject
        |
        +--oracle.forms.jdapi.JdapiModule
              |
              +--oracle.forms.jdapi.PlsqlModule
All Implemented Interfaces:
JdapiObject

public class PlsqlModule
extends JdapiModule

Object to represent a Forms PlsqlModule object. This is an encapsulation of the Forms C API d2flib.

In some cases, using methods on this class may result in a JdapiIllegalStateException being thrown. When this happens, you are using an object that refers to a Forms object that has been deleted - your reference is no longer valid. You can check if an instance of this class is valid by using the isValidFormsObject() method. If you code correctly, this should not happen. It will tend to happen if you keep references (for extended periods) to Forms objects rather than look them up dynamically. Of course you will only have this problem if you destroy Forms objects.

See Also:
BaseAPI

Fields inherited from class oracle.forms.jdapi.JdapiModule
m_clientInfo, m_pd2fob
 
Fields inherited from interface oracle.forms.jdapi.JdapiObject
PROPERTY_DEFAULT_VALUE, PROPERTY_INHERITED_VALUE, PROPERTY_OVERRIDDEN_DEFAULT_VALUE, PROPERTY_OVERRIDDEN_INHERITED_VALUE, PROPERTY_STATE_UNKNOWN
 
Constructor Summary
protected PlsqlModule(long pd2flib)
          Protected constructor, used internally to create PlsqlModule objects.
 
Method Summary
 PlsqlModule clone(java.lang.String newName)
          Creates a copy of the object as a child of 'parent'.
 void compile()
          Compiles the module to the filesystem.
static PlsqlModule find(java.lang.String name)
          Find an instance of PlsqlModule.
 JdapiIterator getAttachedLibraries()
          Accessor for child AttachedLibrary objects (ATTACHMENT_LIBRARY_PTID).
 java.lang.String getLibraryLocation()
          Get text property LibraryLocation (LIBRARY_LOCATION_PTID).
 int getLibrarySource()
          Get number property LibrarySource (LIBRARY_SOURCE_PTID).
 JdapiIterator getProgramUnits()
          Accessor for child ProgramUnit objects (LIBRARY_PROGRAM_UNIT_PTID).
 int getTypeId()
          Gets the HtmlForms object type ID.
static PlsqlModule open(java.io.File file)
          Loads a PlsqlModule module from the filesystem or from the loaded modules list.
static PlsqlModule open(java.io.File file, java.lang.String formsPath)
          Loads a PlsqlModule module from the filesystem or from the loaded modules list.
static PlsqlModule open(java.lang.String fileName)
          Loads a PlsqlModule module from the filesystem or from the loaded modules list.
static PlsqlModule open(java.lang.String fileName, java.lang.String formsPath)
          Loads a PlsqlModule module from the filesystem or from the loaded modules list.
 void save(java.lang.String fileName)
          Saves the module to the filesystem.
 
Methods inherited from class oracle.forms.jdapi.JdapiModule
changeOwner, clearObjectPointer, clone, createSubclassedChild, destroy, equals, getAbsolutePath, getBooleanProperty, getChildObjectProperty, getClassName, getClientInfo, getIntegerProperty, getIntegerPropertyString, getJdapiMetaObject, getMetaProperties, getModule, getModulesProductVersion, getName, getObjectPointer, getObjectProperty, getObjProp, getOwnedObjects, getOwner, getPersistentClientInfoBlob, getPersistentClientInfoObject, getPropertyState, getPropertyValueName, getQualifiedName, getStringIDProperty, getStringProperty, getSubclassParent, hasDefaultedProperty, hasInheritedProperty, hasOverriddenProperty, hasProperty, inheritProperty, isSubclassed, isValidFormsObject, move, openModule, openModule, openModule, openModule, queryType, reattach, setAbsolutePath, setBooleanProperty, setClientInfo, setIntegerProperty, setObjectProperty, setObjProp, setPersistentClientInfo, setPersistentClientInfo, setStringProperty, setSubclassParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlsqlModule

protected PlsqlModule(long pd2flib)
Protected constructor, used internally to create PlsqlModule objects. This doesn't actually create a new PlsqlModule, it just creates a Java instance for an already existing Forms object.

Do NOT use this constructor, even within the Jdapi package. If you have a pointer and need to instantiate it's Java representation, get the object via the context cache, e.g.

 myBaseObject = Jdapi.getObject(myPointer);
 
Parameters:
pd2fctx - C pointer to Forms context
pd2flib - C pointer to Forms object
Method Detail

getTypeId

public int getTypeId()
Gets the HtmlForms object type ID.
Overrides:
getTypeId in class oracle.forms.jdapi.BaseFormsObject
Returns:
X_OTID ID for this object type

open

public static PlsqlModule open(java.lang.String fileName)
Loads a PlsqlModule module from the filesystem or from the loaded modules list.

A runtime exception is thrown if a module the file has subclassed from cannot be found on the Forms path. This behaviour can be suppressed with the Jdapi.setFailSubclassLoad() method.

Parameters:
fileName - File name of PlsqlModule to load
Returns:
PlsqlModule object

open

public static PlsqlModule open(java.io.File file)
Loads a PlsqlModule module from the filesystem or from the loaded modules list.

A runtime exception is thrown if a module the file has subclassed from cannot be found on the Forms path. This behaviour can be suppressed with the Jdapi.setFailSubclassLoad() method.

Parameters:
fileName - File representing PlsqlModule to load
Returns:
PlsqlModule object

open

public static PlsqlModule open(java.lang.String fileName,
                               java.lang.String formsPath)
Loads a PlsqlModule module from the filesystem or from the loaded modules list.

A runtime exception is thrown if a module the file has subclassed from cannot be found on the Forms path. This behaviour can be suppressed with the Jdapi.setFailSubclassLoad() method.

Parameters:
fileName - Filename of PlsqlModule to load
formsPath - Path to use to look for modules that have been subclassed from. 'null' means use the default FORMS70_PATH.
Returns:
PlsqlModule object

open

public static PlsqlModule open(java.io.File file,
                               java.lang.String formsPath)
Loads a PlsqlModule module from the filesystem or from the loaded modules list.

A runtime exception is thrown if a module the file has subclassed from cannot be found on the Forms path. This behaviour can be suppressed with the Jdapi.setFailSubclassLoad() method.

Parameters:
File - File representing PlsqlModule to load
formsPath - Path to use to look for modules that have been subclassed from. 'null' means use the default FORMS70_PATH.
Returns:
PlsqlModule object

save

public void save(java.lang.String fileName)
Saves the module to the filesystem.

Note that this method is currently unsupported for PlsqlModule types, and if called, a JdapiUnsupportedOperationException will be thrown.

Overrides:
save in class JdapiModule
Parameters:
fileName - Filename to save as

compile

public void compile()
Compiles the module to the filesystem.

Note that this method is currently unsupported for PlsqlModule and ObjectLibrary types, and if called, a JdapiUnsupportedOperationException will be thrown.

Overrides:
compile in class JdapiModule
Parameters:
fileName - name of file to compile

clone

public PlsqlModule clone(java.lang.String newName)
Creates a copy of the object as a child of 'parent'.
Parameters:
newName - Name of object that's being created
Returns:
Replicant object

find

public static PlsqlModule find(java.lang.String name)
Find an instance of PlsqlModule.
Parameters:
parent - Parent object of object you wish to find
name - Name of object you wish to find
Returns:
Object instance you are looking for, or null if none was found

getLibraryLocation

public java.lang.String getLibraryLocation()
Get text property LibraryLocation (LIBRARY_LOCATION_PTID).
Returns:
Value of property

getLibrarySource

public int getLibrarySource()
Get number property LibrarySource (LIBRARY_SOURCE_PTID).
Returns:
Value of property

getAttachedLibraries

public JdapiIterator getAttachedLibraries()
Accessor for child AttachedLibrary objects (ATTACHMENT_LIBRARY_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of AttachedLibrary objects

getProgramUnits

public JdapiIterator getProgramUnits()
Accessor for child ProgramUnit objects (LIBRARY_PROGRAM_UNIT_PTID). Gets list of child objects as an iterator (which implements Enumeration for simple traversal).
Returns:
Iterator of ProgramUnit objects