資源簡介
Eclipse項目出現missing library錯誤,缺少xdoclet-1.2.1jar包,在網上找了很多資源都不能用,好不容易找到一個,在此備注下,也希望可以幫到大家
使用方法:
右鍵單擊項目----XDoclet------XDoclet home:選擇xdoclet-1.2.1的lib文件夾-----確定
代碼片段和文件信息
package?test.dao;
import?test.interfaces.CustomerPK;
import?test.ejb.CustomerBMPBean;
import?java.util.*;
import?javax.ejb.*;
/**
?*?Example?DAO?implementation?class
?*/
public?class?CustomerExampleDAO
implements?CustomerDAO
{
????
????/**
?????*?Initialise?DAO
?????*/
????public?void?init()
????{
????????//?do?JNDI?lookup?of?Datasource?resource?ref
????}
????
????/**
?????*?Called?by?ejbLoad
?????*/
????public?void?load(CustomerPK?pk?CustomerBMPBean?bean)
????{
????????//?SELECT?FROM?datasource?WHERE?pkfields?=?pk.getX()
????????//?bean.setX(read?values)
????}
????
????/**
?????*?Called?by?ejbStore
?????*/
????public?void?store(CustomerBMPBean?bean)
????{
????????//?UPDATE?datasource?SET?values?=?bean.getX()
????}
????
????/**
?????*?Called?by?create?method(s)
?????*/
????public?CustomerPK?create(CustomerBMPBean?bean)
????{
????????CustomerPK?pk?=?null;
????????//?INSERT?INTO?datasource?(values)?VALUES?(bean.getX())
????????//?pk?=?new?CustomerPK(pkfields)
????????return?pk;
????}
????
????/**
?????*?Called?by?ejbRemove
?????*/
????public?void?remove(CustomerPK?pk)
????{
????????//?DELETE?FROM?datasource?WHERE?pkfields?=?pk.getX()
????}
????
????/**
?????*?Called?by?mandatory?PK?finder
?????*/
????public?CustomerPK?findByPrimaryKey(CustomerPK?pk)
????{
????????//?SELECT?FROM?datasource?WHERE?pkfields?=?pk.getX()
????????//?if?not?found
????????//???throw?new?objectNotFoundException();
????????//?pk?=?new?CustomerPK(...);
????????return?pk;
????}
????
????/**
?????*?Finder?that?returns?all?rows
?????*/
????public?Collection?findAll()
????{
????????List?ret?=?new?ArrayList();
????????CustomerPK?pk;
????????//?SELECT?FROM?datasource
????????//?for?each?resultset?row
????????//???pk?=?new?CustomerPK(...);
????????//???ret.add(pk);
????????return?ret;
????}
????
????/**
?????*?Non-lifecycle?business?method?delegate
?????*/
????public?void?backup(CustomerPK?pk)
????{
????????//?INSERT?INTO?datasource.Archive?(fields)
????????//???SELECT?fields?FROM?Customer?WHERE?pkfields?=?pk.getX();
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2004-04-28?00:21??xdoclet-1.2.1\
?????目錄???????????0??2004-04-28?00:16??xdoclet-1.2.1\docs\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\
?????目錄???????????0??2004-04-28?00:15??xdoclet-1.2.1\docs\ant\xdoclet\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\ant\
?????目錄???????????0??2004-04-28?00:15??xdoclet-1.2.1\docs\ant\xdoclet\modules\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\axis\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\axis\ejb\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\soap\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\soap\ejb\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\struts\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\apache\struts\ejb\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\bea\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\bea\wls\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\bea\wls\ejb\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\bea\wls\web\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\borland\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\borland\bes\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\borland\bes\ejb\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\caucho\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\doc\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\doc\info\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\dao\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\dd\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\entity\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\home\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\intf\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\lookup\
?????目錄???????????0??2004-04-28?00:14??xdoclet-1.2.1\docs\ant\xdoclet\modules\ejb\session\
............此處省略1094個文件信息
- 上一篇:JSP軟件工程案例精解 光盤源代碼
- 下一篇:《Java語言程序設計》源代碼沈澤剛
評論
共有 條評論