2015-04-02 13:02
ORBADA » Documentation in English » Plug-in documentation » BeanShell » Examples

### 4.A.1.7.1. BeanShell view for perspectives with a database connection

The following command uses the class generator sources Orbada Oracle Plugin to generate the source system view USER_TABLES.

    import pl.mpak.orbada.oracle.util.SourceCreator;
    return (new SourceCreator(database, null)).getSource("SYS", "VIEW", "USER_TABLES");

This command displays on the screen using the predefined function `showResultSet` all the parameters of procedures for obtaining them from the metadata JDBC driver.

    showResultSet(database.getMetaData().getProcedureColumns(null, null, null, null));

### 4.A.1.7.2. BeanShell view

displays on the result tab string "ABC".

    self.println("ABC");

Command changes on apllication run time, the background color of selected tab.

    javax.swing.UIManager.put("Table.selectionBackground", new Color(160, 160, 200));

### 4.A.1.7.3. On running the application

The following script, you can put in the settings BeanShell plugin to extend the look JGOODIES.

    javax.swing.UIManager.put("TabbedPane.background", new Color(220, 220, 220));
    Color selectionBackground = new Color(160, 160, 200);
    javax.swing.UIManager.put("List.selectionBackground", selectionBackground);
    javax.swing.UIManager.put("Table.selectionBackground", selectionBackground);

### 4.A.1.7.4. BeanShell action

• Oracle schema and table name • Oracle quick copy a table DDL to clipboard • Kill Oracle session without DBA role •

### 4.A.1.7.5. SQL queries tab

When you run the query in the results list appears in a text representation of the version '1.0.0.150'

    select 'beanshell { new pl.mpak.util.id.VersionID(1, 0, 0, 150) }' value from dual

ORBADA » Documentation in English » Plug-in documentation » BeanShell » Examples
• © 2007–2015 • Andrzej Kałuża • Powered By DBPAGES • Hostet at •