JDXDemo Help
JDXDemo is a swing based utility program which you can use to test your ORM (Object-Relational Mapping) specification. JDXDemo can also help in formulating ad-hoc query predicates, which can then be incorporated in your application programs. This program provides a graphical front end for user input, invokes JX/JDX method calls and displays the results.
IMPORTANT: Before running JDXDemo, make sure that the object classes and corresponding database tables have been created and the classpath has been set for the JDBC driver and object classes.
Most of the JDXDemo components (buttons etc.) have useful tooltips. Here is a brief description of some of the components
Class Name
This combo box is used to pick a class name to do the operation for. The class names come from the list defined in the configuration file for JDXDemo. A chosen class must have the OR-Mapping defined in the mapping file.
Search Criteria
Use this text box to specify a criteria (predicate) to search qualifying objects for the specified class in the database. You can use this facility to create ad-hoc queries and prototype your JDX application query code. Leave the Search Criteria blank if you don't want to specify any predicate.
Search
This button is used to start a query and show the qualifying objects in the central panel. The total number of objects is governed by Max Objects value (default is 3). If Max Objects is specified as –1, all qualifying objects are retrieved.
Deep, Shallow
Use these radio buttons to specify the depth of the query. Choose Deep if you want all the related objects to be fetched in the same operation. Choose Shallow if you want only the top level object to be fetched. You can further refine the depth of the operation using the Options panel, described below.
Stream
This check box is used to fetch the qualifying object in a stream (chunks of objects at a time). For streaming option, first begin a transaction using the Begin button. The first set of objects (upto Max Objects) are retrieved using the Search button. After that, you can retrieve the remaining objects using the Fetch more button with the same or different value of Max Objects . After you are done with streaming, end the transaction with Commit or Rollback button.
XML Output
Select this check box if you want JDX to convert the object data into an xml sting. For each qualified object, JDX creates an XML string from the top level object and all its referenced objects which are contained by value. By default, JDX creates XML elements from of the class names and complex attributes, and creates XML attributes from the primitive attributes observing proper nesting as per the object structure. The depth and breadth of the XML string may be controlled by using Deep , Shallow, and Max Objects settings.
DB Version
Show the database version.
Model Summary
Show the object model summary of the current ORM specification.
Transactions
Use the three buttons on the right hand side panel to Begin, Commit or Rollback a transaction.
Options
Using this panel, you may specify directed operation options to further control the depth of the queries. For Follow attributes and Ignore attributes boxes, specify the needed class name and attribute name pairs (e.g., Publisher titles Title royscheds). Case sensitivity is important. Also, the fully qualified class names should be specified. Come back to Results panel to start the operation and see the results.
You may specify an update list of attribute names and values in the Update attributes box. Each attribute name should be followed by a space, an equalto (=) letter, a space and then the value. For example,
city = ‘New York’
Hitting the Update button in the Results panel will execute update2() method with the specified set of new values for the class specified in through the Class Name combo box.Next Seq
You can check a sequencer specified by SequenceName and Increment parameters in the configuration file. The sequencer should have been defined in the mapping file. Pushing this button retrieves and displays the value of the next sequence number.
Next Seq
You can check a sequencer specified by SequenceName and Increment parameters in the configuration file. The sequencer should have been defined in the mapping file. Pushing this button retrieves and displays the value of the next sequence number.
A+ and A-
Use these buttons to increase or decrease the font size of the chanracters in the main panel. You may also control the font size by scrolling the wheel of a mouse.
SQL Statements from a file
You can conveniently load and execute SQL statements from a file to save some typing. Use this text box to specify the file name containing the SQL commands. Hit Execute SQL from file button to execute those SQL commands.
(c) 2026 Software Tree, LLC