`
spring028
  • 浏览: 43789 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表

生日快乐

昨天的一场雨让今天的天气变得很冷了,风也大了,我也感到这个秋天对我来说比任何时候都那么的有凉意了。自己曾经无数次的看到或听到那句熟悉不能在熟悉的话“拥有的时候不知道珍惜,当失去的时候才知道是那么的割舍不下”。我现在能真正的体会到这句话的含义了,我说的不是我感情的生活,我失去的是我投入了我全部经历和心血的事业,我曾经有那么多得辉煌举措,我曾经那么的信心百倍的要让自己在现实的生活里证明自己是一个坚强的人,但是在突然到来的现实面前我连考虑的时间都没有就这样让这个秋天的雨和风把我狠狠的按在地上,让满地冰冷的泥水夹杂这没有生命的树叶把我弄得浑身湿漉漉脏兮兮的,我怎么了?生活会给你很多机会让你在现实中得到锻 ...
public static void main(String[] args) { Session session = null; Transaction tx = null; List list = null; Criteria criteria = null; try { session = HibernateSessionFactory.getSession(); tx = session.beginTransaction(); ...
public void insert(Object o){ Session session = HibernateSessionFactory.currentSession(); Transaction t = session.beginTransaction(); session.save(o); t.commit(); HibernateSessionFactory.clossSession(); } delete方法 public void delete(Object o,Serializable id){ Session session ...
1.  logic:empty           该标签是用来判断是否为空的。如果为空,该标签体中嵌入的内容就会被处理。该标签用于以下情况:          1)当Java对象为null时;         2)当String对象为""时;          3)当 ...
1.使用<html:option>标签 <html:select property="city"> <html:option value="010">北京市</html:option> <html:option value="020">广州市</html:option> <html:option value="021">上海市</html:option>
     从明天起,做一个幸福的人  喂马,劈柴,周游世界  从明天起,关心粮食和蔬菜  我有一所房子,面朝大海,春暖花开  从明天起,和每一个亲人通信  告诉他们我的幸福  那幸福的闪电告诉我的  我将告诉每一个人  给每一条河每一座山取一个温暖的名字  陌生人,我也为你祝福  愿你有一个灿烂的前程  愿你有情人终成眷属  愿你在尘世获得幸福  我只愿面朝大海,春暖花开   这是海子的诗,原来以为面朝大海,春暖花开,已经让他看到了另一番世界.没想到只是绝望后重燃的希望.
1.hql更新 String hql = "update PhUser set realName=?"; int row=this.getSession().createQuery(hql).setString(0, "小李想").executeUpdate(); PhUser 类名 2.hql删除 String hql = "delete PhUser a where a.userId=2"; int row=this.getSession().createQuery(hql).executeUpdat ...
Dear Chinese friends,   Tonight, we come to the end of 16 glorious days which we will cherish forever.   Thank you to the people of China, to all the wonderful volunteers and to BOCOG!   Through these Games, the world learned more about China, and China learned more about the world. Athletes from ...
通用的DAO接口: package org.dave.base.dao; import java.util.List; public interface BaseDAO { public void save(Object entity); public void delete(Object entity); public Object findById(String id); public List findAll(); public List findByExample ...
The Chinese man football, I do not want to say too much already, I do not know what would their future direction, nor do I know what attitude they will continue to go to.Chinese man footballplayers are rubbish!!MD!
本节讲述如何使用Hibernate实现记录的增、删、改和查功能。 1 查询        在Hibernate中使用查询时,一般使用Hql查询语句。 HQL(Hibernate Query Language),即Hibernate的查询语言跟SQL非常相像。不过HQL与SQL的最根本的区别,就是它是面向对象的。 使用HQL时需要注意以下几点: l         大小写敏感 因为HQL是面向对象的,而对象类的名称和属性都是大小写敏感的,所以HQL是大小写敏感的。 Eg. HQL语句:from Cat as cat where cat.id > 1;与from Cat as cat whe ...
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans>  <bean id="dataSource"  class="org.apache.commons.dbcp.BasicDataSource" ...
换了MyEclipse6.5,做一个SSH项目,报了错误,检查了两个小时要崩溃。才发现是jar包发生冲突了,又气又恨这个新IDE。 报错代码:   严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityM ...
1、读取配置文件获得连接   读取hibernate.cfg.xml配置文件,hibernate.cfg.xml文件放在Classpath下,使用下面的方式读入该文件      //Configuration 负责管理hibernate配置信息      Configuration config=new Configuration().configure();      //根据config建立SessionFactory      //SessionFactory用于建立Session      SessionFactory sessionFactory=config.buildSession ...
一、Query查询可以先设定查询参数,之后通过set等方法,将指定的参数值添入.还可以使用命名参数Session session = sessionFactory.openSession();Query query = session.createQuery("select user.name from User as user where user.age>?( :minAge )");query.setInteger(0,25);query.setInteger("minAge",25);List names=query.list();Itera ...
Global site tag (gtag.js) - Google Analytics