<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/dsolsoftware/">
    <title>DSOL. software</title>
    <link>http://w.atwiki.jp/dsolsoftware/</link>
    <atom:link href="https://w.atwiki.jp/dsolsoftware/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>DSOL. software</description>

    <dc:language>ja</dc:language>
    <dc:date>2006-03-03T14:00:20+09:00</dc:date>
    <utime>1141362020</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/dsolsoftware/pages/4.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/dsolsoftware/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/dsolsoftware/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/dsolsoftware/pages/3.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/dsolsoftware/pages/4.html">
    <title>実装ガイド/DAOクラスの実装</title>
    <link>https://w.atwiki.jp/dsolsoftware/pages/4.html</link>
    <description>
      *DAOクラスの実装
**自動生成DAO [#icf327a7]
&gt;
-daoパッケージにあるsuffixがBaseDAOのクラスです。
-各エンティティ毎のDAOはデータベースのスキーマ情報により自動生成されます。&amp;br()
以下の基本的な機能は実装済みです。
|機能|メソッド名|
|PK検索|findByPK|
|挿入|save|
|更新|update|
|1key検索|findByXXXX|

**独自DAO [#sd350cdd]
&amp;color(red){&#039;&#039;必ず以下の実装方法１（Criteria）または実装方法２（HQL）で実装してください。&amp;br;この２つの実装方法を採用する限り、SQLインジェクション、クロスサイトスクリプティングによる当システムへの攻撃を回避することができます。&#039;&#039;};

&gt;
-daoパッケージに{テーブル名}DAOという&amp;br()
何も実装していないクラスがありますので、&amp;br()
このクラスにメソッドを随時追加実装して下さい。
&gt;
 public class EmpTblDAO extends EmpTblBaseDAO
 {
    /**
     * コンストラクタ
     * @throws DaoException
     */
    public EmpTblDAO(Session session) throws DaoException {
        super(session);
    }
    // 必要に応じて追加実装して下さい。
 }

***実装方法１（Criteria）
&gt;
org.hibernate.Criteriaとorg.hibernate.criterionパッケージのAPIを駆使し、
データベースからレコードを取得する。
&gt;
（empNameでlike検索をする例）
 public List getEmpList(String empName){
     Criteria criteria = getSession().createCriteria(Emp.class);
     criteria.add(Restrictions.like(&quot;empName&quot;, &quot;%&quot; + empName + &quot;%&quot;));
     criteria.list();
 }
***実装方法２（HQL）
&gt;
HQL文を作成しデータベースからレコードを取得する。
&gt;
（empNameでlike検索をする例）
 public List getEmpList(String empName){
     String hql = &quot;from Emp where empName like :empNo&quot;;
     Query query = getSession().createQuery(hql);
     query.setString(&quot;empNo&quot;, &quot;%&quot; + empName + &quot;%&quot;);
     query.list();
 }    </description>
    <dc:date>2006-03-03T14:00:20+09:00</dc:date>
    <utime>1141362020</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/dsolsoftware/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/dsolsoftware/pages/1.html</link>
    <description>
      *DSOL. software    </description>
    <dc:date>2006-03-03T13:03:26+09:00</dc:date>
    <utime>1141358606</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/dsolsoftware/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/dsolsoftware/pages/2.html</link>
    <description>
      MENU
-[[トップページ]]
-[[メニュー]]
-[[メニュー2]]    </description>
    <dc:date>2006-03-03T13:03:26+09:00</dc:date>
    <utime>1141358606</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/dsolsoftware/pages/3.html">
    <title>メニュー2</title>
    <link>https://w.atwiki.jp/dsolsoftware/pages/3.html</link>
    <description>
      **更新履歴
#recent(20)
    </description>
    <dc:date>2006-03-03T13:03:26+09:00</dc:date>
    <utime>1141358606</utime>
  </item>
  </rdf:RDF>
