資源簡介
內置一個基于數據庫的代碼生成器rapid-generator,極易進行二次開發 struts1,struts2的零配置 spring集成及加強,自動搜索hibernate的entity annotation class 集成動態構造sql的工具:rapid-xsqlbuilder 集成javascript表單驗證:rapid-validation 集成extremeTable列表分頁組件,并簡單擴展顯示pageNumber 集成DBUnit及spring對數據庫測試的支持 內置的分頁查詢PageInfo接口 Java日期轉換的特殊處理,與My97DatePicker集成 內置最精簡的ant構建腳本,簡單修改即可使用 公共類庫友好的包名javacommon 整個項目盡量做到最小集,無需刪除任何資源,拿來即可使用. 友好的MIT-Licence

代碼片段和文件信息
package?javacommon.base;
import?java.lang.reflect.InvocationTargetException;
import?java.sql.Date;
import?java.sql.Time;
import?java.sql.Timestamp;
import?java.util.Map;
import?javacommon.beanutils.converter.StringConverter;
import?javacommon.page.Page;
import?javacommon.page.PageInfo;
import?javacommon.util.ExtremetablePage;
import?javacommon.util.PageInfoFactory;
import?org.apache.commons.beanutils.BeanUtils;
import?org.apache.commons.beanutils.ConvertUtils;
import?org.apache.commons.beanutils.converters.DoubleConverter;
import?org.apache.commons.beanutils.converters.FloatConverter;
import?org.apache.commons.beanutils.converters.IntegerConverter;
import?org.apache.commons.beanutils.converters.LongConverter;
import?org.apache.commons.beanutils.converters.SqlDateConverter;
import?org.apache.commons.beanutils.converters.SqlTimeConverter;
import?org.apache.commons.beanutils.converters.SqlTimestampConverter;
import?org.apache.struts2.ServletActionContext;
import?org.apache.struts2.interceptor.RequestAware;
import?org.apache.struts2.interceptor.SessionAware;
import?org.springframework.util.Assert;
import?org.springframework.web.util.WebUtils;
import?com.opensymphony.xwork2.ActionSupport;
import?com.opensymphony.xwork2.ModelDriven;
public?abstract?class?baseStruts2Action?extends?ActionSupport?implements?SessionAwareRequestAwareModelDriven?{
protected?Map?session?=?null;
protected?Map?request?=?null;
static?{
ConvertUtils.register(new?StringConverter()?String.class);
????????ConvertUtils.register(new?SqlDateConverter(null)Date.class);
ConvertUtils.register(new?SqlTimeConverter(null)Time.class);
ConvertUtils.register(new?SqlTimestampConverter(null)Timestamp.class);
ConvertUtils.register(new?IntegerConverter(null)?Integer.class);
ConvertUtils.register(new?LongConverter(null)?Long.class);
ConvertUtils.register(new?FloatConverter(null)?Float.class);
ConvertUtils.register(new?DoubleConverter(null)?Double.class);
}
public?void?copyProperties(object?targetobject?source)?{
try?{
BeanUtils.copyProperties(target?source);
}?catch?(IllegalAccessException?e)?{
throw?new?IllegalArgumentException(e);
}?catch?(InvocationTargetException?e)?{
throw?new?IllegalArgumentException(e);
}
}
public?object?copyProperties(Class?targetClassobject?source)?{
object?target?=?null;
try?{
target?=?targetClass.newInstance();
}catch(InstantiationException?e)?{
throw?new?IllegalArgumentException(e);
}catch(IllegalAccessException?e)?{
throw?new?IllegalArgumentException(e);
}
copyProperties(target?source);
return?target;
}
public?void?setSession(Map?session)?{
this.session?=?session;
}
public?void?setRequest(Map?request)?{
this.request?=?request;
}
public?void?savePage(Page?page){
savePage(““page);
}
/**
?*?用于一個頁面有多個extremetable是使用
?*?@param?tableId?等于extremetable的tableId屬性
?*/
public?void?savePag
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????461??2008-07-16?11:29??rapid-fr
?????文件???????5897??2008-08-12?21:33??rapid-fr
?????文件????????536??2008-08-12?21:33??rapid-fr
?????文件???????3015??2008-08-04?20:21??rapid-fr
?????文件???????2730??2008-08-12?21:33??rapid-fr
?????文件????1196109??2008-07-16?11:23??rapid-fr
?????文件?????188671??2008-07-16?11:23??rapid-fr
?????文件??????65621??2008-07-16?11:23??rapid-fr
?????文件??????31605??2008-07-16?11:23??rapid-fr
?????文件?????870292??2008-07-22?10:09??rapid-fr
?????文件?????512707??2008-07-16?11:23??rapid-fr
?????文件?????231949??2008-07-16?11:23??rapid-fr
?????文件????????164??2008-08-12?21:33??rapid-fr
?????文件????????417??2008-08-12?21:33??rapid-fr
?????文件????????252??2008-08-12?21:33??rapid-fr
?????文件???????3817??2008-08-12?21:33??rapid-fr
?????文件???????5968??2008-08-12?21:33??rapid-fr
?????文件???????1831??2008-08-12?21:33??rapid-fr
?????文件????????539??2008-07-16?11:22??rapid-fr
?????文件????????379??2008-07-16?11:22??rapid-fr
?????文件?????870292??2008-08-04?20:21??rapid-fr
?????文件?????168081??2008-07-16?11:22??rapid-fr
?????文件????2195521??2008-07-16?11:22??rapid-fr
?????文件???????8156??2008-07-16?11:22??rapid-fr
?????文件?????452600??2008-07-16?11:22??rapid-fr
?????文件???????3622??2008-07-16?11:22??rapid-fr
?????文件????????355??2008-07-29?10:11??rapid-fr
?????文件??????12470??2008-07-29?10:10??rapid-fr
?????文件???????7368??2008-08-04?20:21??rapid-fr
?????文件????????295??2008-08-04?20:21??rapid-fr
............此處省略250個文件信息
評論
共有 條評論