Persistence Demo Introduction

The Persistence frame is a easy-use , multi-datasource, O-R Mapping, and O-F Mapping middleware. This frame is created for local software developing and simple test environment.Persistence project is a part of Easy-work project which is delivered for helping programmers to save their time.

Users can choose to use The Persistence frame as an Open Source/Free Software product under the terms of the GNU General Public License.

The Persistence Web site (http://www.nonesole.com/) provides the latest information about the easy-work projects.

This demo shows how to develop software by the Persistence frame.Users can do their works in the way that the demo uses.


1. Server Demo

There are three parts in server demo.

Config action

  • Build-config button is always being used when users do not initialize server config.There are three files would be created, and users can eidt them in config-editor area.
  • If users want to initialize server config again,refresh-config button can give them help.

Config editor

  • Connection-pool editor is used for datasource set and connection pool set. This frame supports multi-datasource,users can add datasources in config, and they can be used by programmer in developing.Different datasrouces can share same connection pool set.
  • O-R Mapping editor is used for O-R relation.
  • Server-config editor is craeted by system.In most of the time,users need not change it.

Server action

  • Start-server button is used for starting connection pool and loading O-R relations.
  • Close-server button is used for closing connection pool and erasing O-R relations.

2. Initialization Demo

There are two parts in this demo.

Table maker

  • Select datasource.
  • Edit sql which is for creating table.
  • Execute sql in selected database.

Object maker

If users want to create a new demo object,there are two things they have to do.

  • First,input class name in textfield.Example:'com.nonesole.Demo',or 'Demo'.
  • Second,add fields of object and set field types and primery keys.The default field types just contain classes in 'java.lang.*' and 'java.util*',if users want to set other types,they can set it like this: 'java.net.URL'.

After the two steps,users can click generate button to create java and class file.


3. O-R Mapping Demo

There are four parts in this demo.

Query action

  • Make sure that server has been started.
  • Select datasource.
  • Choose object.
  • Edit query sql.
  • Execute sql.

Insert/Update/Delete action

Insert Action

  • Make sure that server has been started.
  • Select datasource.
  • Choose object.
  • Add object and edit it.
  • Insert one object.

Update/Delete Action

  • Make sure that server has been started.
  • Select datasource.
  • Choose object.
  • Search.
  • Change object and edit it.
  • Update or delete one object.

4. O-F Mapping Demo

There are four parts in this demo.

Query action

  • Input or select search condition.
  • Search.

Insert/Update/Delete action

Insert Action

  • Choose object.
  • Add object and edit it.
  • Insert one object.

Update/Delete Action

  • Input or select search condition.
  • Search.
  • Change object and edit it.
  • Update or delete one object.