CoolSQL使用(英文版)

Introduce

WebExplore is a plugin for CoolSQL, which is suitable for people engaged in web application development. With all features of CoolSQL, WebExplore can run on the platform where Java Runtime Environment is installed(1.5 or above). It bases on ibator inheriting and extending excellent features of ibator. So WebExplore is also a code generator using graphics interface

Features

Generate code for ibatis-based web development including model, DAO(inerface and implementation) and configuration files
It’s convenient to do generating operation with friendly graphics interface
Support fast generating and merging files (Java files and Sqlmapconfig file) without the fear of losing the declaration added manually
It can run on the platform where Java Runtime Environment is installed (1.5 or above).
It’s free.

How to use

Suggest you read some document about Ibator before starting content below. WebExplore bases on Ibator, so it’s easy to understand how WebExlore works if you have some ibator experience.

  1. Ibator Configuration: Each Ibator configuration corresponding to one bookmark. So it’s necessary to create a bookmark and connect to database. Select “Context Configuration” in the popup menu on bookmark node in bookmark tree, or select menuitem: WebExplore -> Context Configuration, and then Configuration dialog which contains context configuration, table configuration and classpath entries will be displayed.

Select configuration menu
Select configuration menu

Select configuration menu
Select configuration menu

Click button 加号 to set up a new context. The configuration dialg compose of three tab page: Common Options, Generator Options and Plugin. These options on the configuration panel are consistent with Ibator (Detailed document).
Common Options: This part contains some common options for ibator context including ID, project, model type and runtime
Generator Options: This part almost contains all options in Ibator for generator including Java model, Sqlmap and DAO
Plugin: If you want to custom your own functions, you should install some plugins to WebExplore in this tab page. In addition, WebExplore provide some plugins such as com.coolsql.plugin.webexplore.ibator.plugin.WebExploreCommentIbatorPlugin. Suggest that you’d better develop your own plugin by extending com.coolsql.plugin.webexplore.ibator.plugin.WebExploreIbatorPlugin. Note: You should add extra libraries to classpath before adding your own plugins

The next step is to set up table configuration after a context is created. Click button 加号 , and then a dialog like picture below will be popped up:

在这里插入图片描述

In this dialog, you can select tables or columns which you want to generate conveniently. If some tables should have same configuration, you can achieve it by selecting all tables and clicking “Edit Property” button.
Table Configuration Dialog
Table Configuration Dialog
Lastly, you can specify the SqlmapConfig file if needed. If you do so, WebExplore will merge the sqlmap file corresponding to table in database to this file.

  1. Generate Code: WebExplore provides two way to generate code.

Fast Generating: This mode only support bookmark node and table node. With a correct context configuration, you can select menu like this:
在这里插入图片描述

Generating with configuration wizard: This mode support bookmark, catalog, schema, tables and table node. With a correct context configuration, a generating wizard where you can adjust table configuration again will help you confirm all options. The pictures below show the whole process:
Select Context
Select Context

Confirm Table Configuration

Confirm Table Configuration
The Summary Of Configuration
The Summary Of Configuration

The Last Page
The Last Page

发布了20 篇原创文章 · 获赞 1 · 访问量 504

猜你喜欢

转载自blog.csdn.net/sunny_day_day/article/details/105213377