首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

hibernate实体类投射(xml)

2013-03-01 
hibernate实体类映射(xml)package entityimport java.io.Serializable@SuppressWarnings( { serial,

hibernate实体类映射(xml)

package entity;import java.io.Serializable;@SuppressWarnings( { "serial", "unchecked", "unused" })public class Admin implements Serializable {private Long userId;private String userName;private String passWord;private String roleName;private int privilege;private int status;public String getUserName() {return userName;}public void setUserName(String userName) {this.userName = userName;}public String getPassWord() {return passWord;}public void setPassWord(String passWord) {this.passWord = passWord;}public String getRoleName() {return roleName;}public void setRoleName(String roleName) {this.roleName = roleName;}public Long getUserId() {return userId;}public void setUserId(Long userId) {this.userId = userId;}public int getPrivilege() {return privilege;}public void setPrivilege(int privilege) {this.privilege = privilege;}public int getStatus() {return status;}public void setStatus(int status) {this.status = status;}}

?

?

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping package="entity"><class name="Admin" table="admin"><id name="userId" column="userid"><generator type="string" not-null = "true" column="username"/><property name="passWord" type="string" not-null="true" column="password"></property><property name="roleName" column="rolename" type="string"></property><property name="privilege" column="privilege" type="int"></property><property name="status" column="status" type="int"></property></class></hibernate-mapping>

?

热点排行