2018年8月31日
摘要: 1.获取某个类的属性值 public static void main(String[] args) throws Exception { User u = new User(); u.setAddress("Beijing"); Class<?> c = u.getClass(); Method 阅读全文
posted @ 2018-08-31 15:10 美丽的小鹿 阅读(189) 评论(2) 推荐(0) 编辑
摘要: Hibernate 使用查询部分/指定字段,有几种字现方式: 第一种方式是通过HQL语句实现,类似SQL,方法如下: String hql = "select id,name from Link";Query query = session.createQuery(hql);//默认查询出来的lis 阅读全文
posted @ 2018-08-31 15:00 美丽的小鹿 阅读(2155) 评论(0) 推荐(0) 编辑
摘要: 一、JAVA集合主要分为三种类型: Set(集) 、List(列表)、Map(映射) 其中Set 和List 都继承了Conllection,Map没有 Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└Set(hashset、Linked 阅读全文
posted @ 2018-08-31 13:52 美丽的小鹿 阅读(185) 评论(2) 推荐(0) 编辑