随笔 - 71  文章 - 15  trackbacks - 0
<2024年12月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

因为口渴,上帝创造了水;
因为黑暗,上帝创造了火;
因为我需要朋友,所以上帝让你来到我身边
Click for Shaanxi xi'an, Shaanxi Forecast
╱◥█◣
  |田|田|
╬╬╬╬╬╬╬╬╬╬╬
If only I have such a house!
〖总在爬山 所以艰辛〗
Email:myesjoy@yahoo.com.cn
NickName:yesjoy
MSN:myesjoy@hotmail.com
QQ:150230516

〖总在寻梦 所以苦痛〗

常用链接

留言簿(3)

随笔分类

随笔档案

文章分类

文章档案

Hibernate在线

Java友情

Java认证

linux经典

OA系统

Spring在线

Structs在线

专家专栏

企业信息化

大型设备共享系统

工作流

工作流产品

网上购书

搜索

  •  

最新评论

阅读排行榜

评论排行榜

<? xml version="1.0" ?>
<! DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" 
>

< hibernate-mapping  package ="gov.cfte.object.hibernate.model" >
    
< class  name ="ObjectLog"  table ="OBJECT_LOG" >
        
< id  column ="ID"  name ="Id"  type ="string"  length ="32" >
            
< generator  class ="net.sf.hibernate.id.UUIDHexGenerator"   />
        
</ id >  
        
< property
            
column ="TYPE_ID"
            length
="32"
            name
="TypeId"
            not-null
="false"
            type
="string"
         
/>
        
< property
            
column ="OPTIME"
            length
="26"
            name
="Optime"
            not-null
="false"
            type
="timestamp"
         
/>
        
< property
            
column ="USER_ID"
            length
="32"
            name
="UserId"
            not-null
="false"
            type
="string"
         
/>
        
< property
            
column ="OPINFO"
            length
="32"
            name
="Opinfo"
            not-null
="false"
            type
="string"
         
/>
        
< property
            
column ="RECORDINFO"
            length
="1024"
            name
="Recordinfo"
            not-null
="false"
            type
="string"
         
/>
        
< property
            
column ="IP"
            length
="32"
            name
="Ip"
            not-null
="false"
            type
="string"
         
/>
    
</ class >
</ hibernate-mapping >
return   this .getHibernateTemplate().find( " from ObjectLog " );
return   this .getHibernateTemplate().find( " from ObjectLog c where c.Opinfo = ? " , queryCondition); // 根据操作方式来精确查询(已测试通过)
return   this .getHibernateTemplate().find( " from ObjectLog c where c.Opinfo like ? " " % " + queryCondition + " % " ); // 根据操作方式来模糊查询(已测试通过)
return   this .getHibernateTemplate().find( " from ObjectLog c where c.TypeId=? and c.Opinfo like ? " , new  Object[]{typeId, " % " + queryCondition + " % " });
posted on 2006-03-28 17:58 ★yesjoy★ 阅读(368) 评论(0)  编辑  收藏 所属分类: Hibernate学习

只有注册用户登录后才能发表评论。


网站导航: