查找oracle自己用户的表
查找oracle自己用户的表
select table_name from user_tables;
查找oracle自己用户的表
select table_name from user_tables;
@Overridepublic Integer getSumZongShuByidList(List<String>idList){
Integer zongshu= 0;
String hql="SELECT sum(zongshu) from Tab where id in (:idList)";
Query query=this.getSession().createQuery(hql);
query.setParameterList("idList", idList);
Long queryZongShu=(Long)query.uniqueResult();if(queryZongShu!=null){
zongshu=Integer.parseInt(queryZongShu.toString());
}returnzongshu;
}
Jquery Ajax 保存:
$.ajax({
type:"POST",
async:false,
url:"${ctx}/url",
data: {pId:provinId},
success:function(returnData){
}
});
//高效率遍历Map以及在循环过程中移除 remove指定key//使用iter循环的时候 可以在循环中移除key,for在循环的过程中移除会报错哦//本方法效率高 Iterator iter =finalFenleiMap.entrySet().iterator();while(iter.hasNext()){
Map.Entry entry=(Map.Entry) iter.next();
Object key=entry.getKey();if(key!=null){
curKey=key.toString();if(curKey.indexOf("国内")!=-1){
finalFenleiMap.put(curKey, scenicList);
}else if(curKey.indexOf("出境")!=-1){
iter.remove();//移除出境 的专题 }
}
}
List根据对象的某个属性排序工具类 List排序importjava.util.Collections;importjava.util.Comparator;importjava.util.List;importorg.apache.commons.beanutils.BeanComparator;importorg.apache.commons.collections.ComparatorUtils;importorg.apache.commons.collections.comparators.ComparableComparator;public classListSortUtil {/*** 按bean的属性值对list集合进行排序
*
*@paramlist
* 要排序的集合
*@parampropertyName
* 集合元素的属性名
*@paramisAsc
* 排序方向,true--正向排序,false--逆向排序
*@return排序后的集合*/ public static List sortList(List list, String propertyName, booleanisAsc) {//借助commons-collections包的ComparatorUtils//BeanComparator,ComparableComparator和ComparatorChain都是实现了Comparator这个接口 if(list!=null && list.size()>0){
Comparator mycmp=ComparableComparator.getInstance();
mycmp= ComparatorUtils.nullLowComparator(mycmp); //允许null if(isAsc){
mycmp= ComparatorUtils.reversedComparator(mycmp); //逆序 }
Comparator cmp= newBeanComparator(propertyName, mycmp);
Collections.sort(list, cmp);
}returnlist;
}
}