日期:2014-05-19 浏览次数:20734 次
public class Art_main implements Serializable{
private String art_id;
private String art_title;;
private Art_source Art_source;
private Art_type Art_type;
public String getArt_id(){
return art_id;
}
public void setArt_id(String art_id){
this.art_id = art_id;
}
public String getArt_title(){
return art_title;
}
public void setArt_title(String art_title){
this.art_title = art_title;
}
public Art_type getArt_type() {
return Art_type;
}
public void setArt_type(Art_type artType) {
Art_type = artType;
}
public Art_source getArt_source() {
return Art_source;
}
public void setArt_source(Art_source artSource) {
Art_source = artSource;
}
public class Art_source implements Serializable{
private String source_id;
private String source_name;
private Set artMains = new HashSet(0);
public Set getArtMains() {
return artMains;
}
public void setArtMains(Set artMains) {
this.artMains = artMains;
}
public String getSource_id() {
return source_id;
}
public void setSource_id(String sourceId) {
source_id = sourceId;
}
public String getSource_name() {
return source_name;
}
public void setSource_name(String source_name) {
this.source_name = source_name;
}
}
<hibernate-mapping >
<class name="com.xunxi.db.back.Art_main" table="art_main">
<id name="art_id" column="art_id">
<generator class="uuid.hex"/>
</id>
<property name="art_title" column="art_title"/>
<many-to-one name="Art_source" class="com.xunxi.db.back.Art_source" fetch="select">
<column name="source_id" length="50" />
</many-to-one>
<many-to-one name="Art_type" class="com.xunxi.db.back.Art_type" fetch="select">
<column name="type_id" length="50" />
</many-to-one>
</class>
</hibernate-mapping>