Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.db.util
Class SchemaObjectBuilder

java.lang.Object
  extended by oracle.ide.db.util.SchemaObjectBuilder

public class SchemaObjectBuilder
extends java.lang.Object

A UI utility to ensure that SystemObject definitions are fully loaded off the UI thread. A SystemObject may take time in being loaded from its source (database dictionary, xml files) and as the load happens lazily this can cause problems for UI components that require the full object definition (e.g. edit dialogs). Using this utility allows the object to be built in one progress bar, with the option to cancel for the user.

A progress bar will only be used if this is invoked on the event thread.

Customization available before calling ensureObjectBuilt(oracle.javatools.db.SystemObject...) or ensureObjectBuiltEx(oracle.javatools.db.SystemObject...) :


Constructor Summary
SchemaObjectBuilder(boolean cancellable)
          Creates a new builder with the option for the user to cancel, or not if the operation must proceed.
 
Method Summary
 void buildDerivedProperties(DBObjectProvider pro)
          Calling this method includes a "derived property" build in the process performed by this builder.
 boolean ensureObjectBuilt(SystemObject... objs)
          Ensures that all of the given SystemObjects are fully loaded from their metadata source (e.g.
 boolean ensureObjectBuiltEx(SystemObject... objs)
          Ensures that all of the given SystemObjects are fully loaded from their metadata source (e.g.
 void setProperties(java.lang.String type, java.lang.String... props)
          Sets specific properties to build.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaObjectBuilder

public SchemaObjectBuilder(boolean cancellable)
Creates a new builder with the option for the user to cancel, or not if the operation must proceed.

Parameters:
cancellable - whether the user can cancel the load
Method Detail

buildDerivedProperties

public void buildDerivedProperties(DBObjectProvider pro)
Calling this method includes a "derived property" build in the process performed by this builder. The provider is needed for a derived property build and so much be included.

Parameters:
pro - the provider to use for the derived property build on this object.
For internal use only. Application developers should not use this
API not finalised yet

setProperties

public void setProperties(java.lang.String type,
                          java.lang.String... props)
Sets specific properties to build. Setting these properties means that the object will not be wholey built, rather these specific properties will be (and their dependents). Setting properties against a type of null will register them for all objects.

Parameters:
type - the object type the properties are for
props - the properties that need building for the given object type.

ensureObjectBuilt

public boolean ensureObjectBuilt(SystemObject... objs)
Ensures that all of the given SystemObjects are fully loaded from their metadata source (e.g. database dictionary). If any object fails to load, false is returned.

If any error is encountered it is displayed to the user.

Parameters:
objs - the objects to build
Returns:
true if all objects sucessfully built
See Also:
ensureObjectBuiltEx(oracle.javatools.db.SystemObject...)

ensureObjectBuiltEx

public boolean ensureObjectBuiltEx(SystemObject... objs)
                            throws DBException,
                                   CancelledException
Ensures that all of the given SystemObjects are fully loaded from their metadata source (e.g. database dictionary). If any object fails to load the relevant exception is thrown (this includes a user cancellation). Compare with ensureObjectBuilt() which does the same thing but handles any exception

Parameters:
objs - the objects to build
Returns:
true if all objects successfully built. false if no non-null objects were supplied
Throws:
DBException - if there was a database error
CancelledException - if the user cancelled the load
See Also:
ensureObjectBuilt(oracle.javatools.db.SystemObject...)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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