#! readMe.txt
メンテナンスサンプルファイル			ver #ver#  #date#

このzipファイルに格納されているファイルはメンテナンスの実行に必要な
ソースコードなどの各種サンプルファイルです。
このサンプルはJava5以上で動作可能です。

  以下に格納されているファイルの詳細を記します。

  【ファイル詳細】
   1.readMe.txt                 このファイル
   2.web.xml                    サンプルweb定義ファイル
   3.db.xml                     サンプルデータベース接続設定ファイル
   4.DaoBase.java               データベースアクセス用の共通クラスのソースコード
   5.RecordAction.java          レコード処理共通インターフェースのソースコード
   6.RecordSearch.java          レコード検索共通インターフェースのソースコード
   7.MenuStartApp.java          WEB画面エントリーポイントjavaソースコード
   8.MaintenanceMenu.java       マスターメンテナンスメニュー画面のjavaソースコード
   9.MaintenanceMenu.html       マスターメンテナンスメニュー画面のHTMLファイル
   10.prototype.js              オープンソースのJavaScriptのライブラリ（ライセンスはこのドキュメントの最後に掲載）
   11.oafw.js                   オープンソースのJavaScriptのフレームワーク

   以下、選択したインターフェースごとのファイル(xxx:インターフェース名)
  12.xxx.java                   インターフェース用 Value Objectのソースコード
  13.xxxCreateTable.sql         インターフェース用データベースのテーブル定義ファイル（create table）
  14.xxxDao.java                インターフェース用データベースアクセス用のjavaソースコード（create table）
  15.xxxInsert.html             インターフェース用新規挿入画面のHTMLファイル
  16.xxxInsert.java             インターフェース用新規挿入画面のjavaソースコード
  17.xxxList.html               インターフェース用検索一覧画面のHTMLファイル
  18.xxxList.java               インターフェース用検索一覧画面のjavaソースコード
  19.xxxReference.html          インターフェース用照会画面のHTMLファイル
  20.xxxReference.java          インターフェース用照会画面のjavaソースコード
  21.xxxUpdate.html             インターフェース用修正画面のHTMLファイル
  22.xxxUpdate.java             インターフェース用修正画面のjavaソースコード


 【サンプル実行方法】
  サンプルを実行するには使用するデータベース用のJDBC環境及びJDBCのjarファイル、
  WEB画面フレームワークのpirka.jar、WEBコンテナとしてTomcat等が必要となります。

  例としてEclipseとTomcatプラグインを使用したサンプルの実行方法を以下に記します。

  1.使用するデータベースでxxxCreateTable.sqlを実行させテーブルを作成します。

  2.Eclipseを起動しTomcatプロジェクトを作成します。

  3.EclipseのWEB-INF/libフォルダーにpirka.jar及びデータベースアクセスに必要なJDBCの
    jarファイルなどをコピーし、プロジェクトのビルド・パスに追加します。

  4.Tomcatプラグインの『コンテキストの更新』及び『Tomcatライブラリをプロジェクトの
    ビルド・パスに追加』を行います。

  5.EclipseのWEB-INF/srcにパッケージ #package# を作成し、Javaソースコード（.java）、
    HTMLファイル(.html)を作成したパッケージにコピーします。

  6.web.xmlをWEB-INFの下にコピーします。

  7.プロジェクトのルートの直下にフォルダー（名前をjs）を作成し、prototype.jsとoafw.jsを
    そのフォルダーに格納します。


  8.db.xmlをWEB-INF/srcの下にコピーし、ファイルに記述してある
    ■JDBCのドライバー名（class.ForName名）、■データベースへの接続文字列、
    ■データベースへの接続ID、■データベースへの接続パスワードを動作環境に合わせて
    修正します。
    また、db.xmlは上記設定以外にデータソースからもコネクションを取得可能です。
    詳細はIOP-tool 使用手引きの6.8 DAO Javaソースファイル出力を参照してください。

  9.Tomcatを起動します。

  10.IE等のブラウザでURL『http://localhost/Eclipseのプロジェクト名/start』を開くと
    マスターメンテナンスメニュー画面が表示されます。


 【db.xmlサンプル】
--- H2用のサンプル -------------------------------------------------------------------------------------
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
	<entry key="driver.name">org.h2.Driver</entry>
	<entry key="connection.string">jdbc:h2:tcp://localhost/E:\H2TestDB\ifop;</entry>
	<entry key="login.id">sa</entry>
	<entry key="login.password"></entry>
</properties>

--- oracle用のサンプル ---------------------------------------------------------------------------------
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
	<entry key="driver.name">oracle.jdbc.driver.OracleDriver</entry>
	<entry key="connection.string">jdbc:oracle:thin:@oa-2003server:1521:ipo</entry>
	<entry key="login.id">scott</entry>
	<entry key="login.password">tiger</entry>
</properties>

--- postgreSQL用のサンプル -----------------------------------------------------------------------------
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
	<entry key="driver.name">org.postgresql.Driver</entry>
	<entry key="connection.string">jdbc:postgresql://127.0.0.1:5432/IOP</entry>
	<entry key="login.id">postgres</entry>
	<entry key="login.password">999999</entry>
</properties>
--------------------------------------------------------------------------------------------------------

--- prototype.jsのライセンス ----------------------------------------------------------------------

Prototype is freely distributable under the terms of an MIT-style license.
For details, see the Prototype web site: http://www.prototypejs.org/

Copyright (c) 2005-2008 Sam Stephenson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------------------------------------------------#!
#! web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
	version="2.4">

	<servlet>
		<servlet-name>StartApp</servlet-name>
		<servlet-class>#package#.MenuStartApp</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>StartApp</servlet-name>
		<url-pattern>/start</url-pattern>
	</servlet-mapping>
</web-app>
#!

#! db.xml
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
	<entry key="driver.name">■JDBCのドライバー名（class.ForName名）</entry>
	<entry key="connection.string">■データベースへの接続文字列</entry>
	<entry key="login.id">■データベースへの接続ID</entry>
	<entry key="login.password">■データベースへの接続パスワード</entry>
</properties>
#!


#! startApp
package #package#;

import java.util.Map;

import jp.oarts.pirka.core.app.EntryPoint;
import jp.oarts.pirka.core.win.PirkaWindow;

/**
 * エントリーポイント
 */
@SuppressWarnings("serial")
public class MenuStartApp extends EntryPoint {

	/**
	 * 初画面の取得
	 *
	 * @param パラメータ
	 * @return 初画面オブジェクト
	 */
	@Override
	protected PirkaWindow getInitWindow(Map<String, String[]> arg0) {

		return new MaintenanceMenu();
	}
}
#!

#! MaintenanceMenu.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-31j">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1">

<style type="text/css">
  <!--
    td { text-align : left }
  -->
 </style>
<title>メンテナンスメニュー</title>
</head>
<body>

<form name="pirkaForm" method="post">
	<center>
		<table>
			<tr>
				<th style="text-align : left">メンテナンスメニュー</th>
				<td style="text-align : right">
					<input type="submit" name="return_button" value="戻る">
				</td>
			</tr>
			<tr><td colspan="2"><br></td></tr>

			<tr><td colspan="2"><font color="#ff0000"><span name="errorMessage"></span></font></td></tr>
			<tr><td colspan="2">
				<table border="0">
					<tr>
						<td>#link0#</td>
					</tr>
					<tr>
						<td>#link1#</td>
					</tr>
					<tr>
						<td>#link2#</td>
					</tr>
					<tr>
						<td>#link3#</td>
					</tr>
					<tr>
						<td>#link4#</td>
					</tr>
					<tr>
						<td>#link5#</td>
					</tr>
					<tr>
						<td>#link6#</td>
					</tr>
					<tr>
						<td>#link7#</td>
					</tr>
					<tr>
						<td>#link8#</td>
					</tr>
					<tr>
						<td>#link9#</td>
					</tr>
			  </table>
			</td></tr>
		</table >
	</center>
</form>
<hr>
</body>
</html>
#!


#! MaintenanceMenu.java
package #package#;

import jp.oarts.pirka.core.kernel.FieldMap;
import jp.oarts.pirka.core.win.PirkaWindow;

/**
 * MaintenanceMenuクラス
 *  @author
 */
@SuppressWarnings("serial")
public class MaintenanceMenu extends  PirkaWindow {

	/**
	 * コンストラクタ
	 *
	 */
	public MaintenanceMenu() {

		///////////////////////////////////////////////////
		//  入力チェック
		///////////////////////////////////////////////////
		FieldMap field = getFieldMap();

		//  入力チェックをしないメソッド
		field.setAutoCheck("return_button", false);
	}
	/**
	 * 描画前処理
	 */
	public void preDraw(){
	}

	/**
	 * return_button
	 * @return 次画面クラス
	 */
	public PirkaWindow return_button(){
		System.out.println("---------return_button");
		return this;
	}

	#link0#

	#link1#

	#link2#

	#link3#

	#link4#

	#link5#

	#link6#

	#link7#

	#link8#

	#link9#

}
#!

#! LinkMethod
		/**
		 * 次画面へリンク処理(#interface#")
		 */
		public PirkaWindow #interface#() {
			return new #interface#List();
		}

#!