(5)TCompanyInfo.java
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
@Entity
@Table(name="T_COMPANY_INFO") //表名T_Company_info
public class TCompanyInfo implements java.io.Serializable {
private Long infoId;
private String infoTitle;
private String infoComm;
@Id
@GeneratedValue(generator="company_seq")
@GenericGenerator(name="company_seq",strategy="sequence",parameters={@Parameter(name="sequence",value="SEQ_COMPANY_INFO")})
public Long getInfoId() { //它们三个是放一块的,SEQ_COMPANY_INFO是数据库里建的sequence
return this.infoId;
}
public void setInfoId(Long infoId) {
this.infoId = infoId;
}
public String getInfoTitle() {
return this.infoTitle;
}
public void setInfoTitle(String infoTitle) {
this.infoTitle = infoTitle;
}
public String getInfoComm() {
return this.infoComm;
}
public void setInfoComm(String infoComm) {
this.infoComm = infoComm;
}
分享到:
相关推荐
spring加入hibernate annotation方式第一部分,需要其他部分请查看本人其他资源
springmvc + hibernate annotation 配置
spring+hibernate annotation 完整示例,带数据库脚本 mysql,tomcat,myeclipse项目
hibernate annotation hibernate3
spring ,hibernate ,flex 应用注释配置的一个例子,里面有数据库脚本和说明文件
现在我们公司在做web项目的时候,已经不用*.hbm.xml这种映射文件了,都是用Annotation(注解)方式来完成实体与表之间的映射关系,这样看起来比用xml文件来映射更具有可读性,自我感觉以后Hibernate Annotation的...
hibernate annotation中文文档
spring3、 hibernate4 配置声明式事务管理(annotation方式)
spring3,hibernate4 配置声明式事务管理(annotation方式)
使用spring和hibernate的Annotation的小项目,帮助新手理解annotation
hibernate annotation spring 中文参考文档
hibernate annotation 中文文档
Spring的Annotation配置相关讲义
很全的Hibernate Annotation API文档,页面也很漂亮,太强大了。真的很实用!我以前找了好多,都不全,这个真的很不错,推荐一下。
JSF+Spring+Hibernate(Annotation)的login小实例,建议入门的朋友看看,老鸟就免了,呵呵。环境:SQLSever2000+jdk5.0+spring2.0+hibernate3.2+jsf
struts2 spring2.5 hibernate3.0 annotation 整合
jquery easyUI+struts2+spring+hibernate基于annotation实现的CRM
struts2+spring2.5+hibernate3.2 annotation配置完整eclipse项目,带数据库脚本
hibernate annotation库所需要引入的三个jar包。
SSH2 annotation 实现struts2.1.6 spring2.5.6 hibernate3.3 全注解开发 hibernate延迟加载_懒加载 具体应用