Scenarios

Searching for specific objects

Using filters

Choose "Look for one or several existing entities" in the persistence unit panel or click on "Search entity" in the toolbar to access this search screen.

Choose a class and add filters to find the desired objects. Use the arrows to navigate between pages if there are too many results.

The tree with checkboxes on the right controls which columns shall be displayed. It is possible to save/load display settings for the columns (position and relative size in %) using the blue drop-down and green "plus" button on the right-hand side.

Double-clicking on one row will open a new tab with the graph view of the corresponding object.

Using custom queries

Choose "Perform a custom query" in the panel related to a persistence unit or click on "Perform Query" in the toolbar to access this screen.

Enter a query string in one the of available languages and click "Perform query" to see the results.

It is possible to use ordinal or named parameters if the query language supports it. The user will be asked to input these parameters.

It is also possible to save/load queries as bookmarks that are currently shared with all the other users.

The combination of bookmarks and parameters can be a nice entry point for accessing data from the model very quickly.

HQL query without any parameters

HQL query with one parameter

Updating objects

Creating new persistent instances

Creating new objects is possible from different locations in Objectwiz.

You can either:

  • Choose "Create a new entity" in the panel related to a persistence unit;

  • Click on "Create entity" in the toolbar to create an object from the same unit than the current tab.

  • Click on the corresponding action button in nodes of the graph that correspond to collections of objects.

You will be asked to choose which class the new object shall be an instance, or redirected directly to the corresponding form if there is no ambiguity.

Creating links between objects

It is possible to link objects directly on the graph by using the corresponding action icons (see two screenshots below).

Depending on the type of property, these actions will either assign the value choosen by the user or add it as another element of the collection.

Using the green "plus" button, the value is created from scratch while when using the blue "down arrow" button an existing value is assigned.

Removing objects

To remove an object, just click on the "red cross" action button on nodes of the graph or choose "Remove element(s)" from a list view.

Calling business logic

To call a method from the logic/business layer, first choose "Call a business method" from the panel related to a persistence unit, or click "Run method" in the toolbar.

The methods are these of the EJB session beans that were discovered by Objectwiz in the JNDI context of the application.

Choose a method, provide the required parameters (if any) and click "Submit".

The results will be shown in a list view below.

When the return type is an array of bytes, the user will be proposed to download the corresponding file.

NOTE: if the method returns objects from the model, you can double-click on one object of the list to open the graph view.