CmpShowmesfirst:
package com.entity;
import java.math.BigDecimal;
/**
* CmpShowmesfirst entity. @author MyEclipse Persistence Tools
*/
public class CmpShowmesfirst implements java.io.Serializable {
// Fields
private BigDecimal csfId;
private String csfTitle;
private String csfContent;
private BigDecimal csfPicid;
public BigDecimal getCsfId() {
return csfId;
}
public void setCsfId(BigDecimal csfId) {
this.csfId = csfId;
}
public String getCsfTitle() {
return csfTitle;
}
public void setCsfTitle(String csfTitle) {
this.csfTitle = csfTitle;
}
public String getCsfContent() {
return csfContent;
}
public void setCsfContent(String csfContent) {
this.csfContent = csfContent;
}
public BigDecimal getCsfPicid() {
return csfPicid;
}
public void setCsfPicid(BigDecimal csfPicid) {
this.csfPicid = csfPicid;
}
public BigDecimal getCsfTypeid() {
return csfTypeid;
}
public void setCsfTypeid(BigDecimal csfTypeid) {
this.csfTypeid = csfTypeid;
}
public CmpSmfPic getCmpsmfpic() {
return cmpsmfpic;
}
public void setCmpsmfpic(CmpSmfPic cmpsmfpic) {
this.cmpsmfpic = cmpsmfpic;
}
private BigDecimal csfTypeid;
public CmpShowmesfirst(BigDecimal csfId, String csfTitle,
String csfContent, BigDecimal csfPicid, BigDecimal csfTypeid,
CmpSmfPic cmpsmfpic) {
super();
this.csfId = csfId;
this.csfTitle = csfTitle;
this.csfContent = csfContent;
this.csfPicid = csfPicid;
this.csfTypeid = csfTypeid;
this.cmpsmfpic = cmpsmfpic;
}
public CmpShowmesfirst() {
super();
}
private CmpSmfPic cmpsmfpic;
// Constructors
}
CmpSmfPic:
package com.entity;
import java.math.BigDecimal;
/**
* CmpSmfPic entity. @author MyEclipse Persistence Tools
*/
public class CmpSmfPic implements java.io.Serializable {
// Fields
private BigDecimal cspId;
private BigDecimal cspCsfid;
private String cspPic;
// Constructors
/** default constructor */
public CmpSmfPic() {
}
/** full constructor */
public CmpSmfPic(BigDecimal cspCsfid, String cspPic) {
this.cspCsfid = cspCsfid;
this.cspPic = cspPic;
}
// Property accessors
public BigDecimal getCspId() {
return this.cspId;
}
public void setCspId(BigDecimal cspId) {
this.cspId = cspId;
}
public BigDecimal getCspCsfid() {
return this.cspCsfid;
}
public void setCspCsfid(BigDecimal cspCsfid) {
this.cspCsfid = cspCsfid;
}
public String getCspPic() {
return this.cspPic;
}
public void setCspPic(String cspPic) {
this.cspPic = cspPic;
}
}
CmpShowmesfirst.hbm.xml:
<?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”>
<!–
Mapping file autogenerated by MyEclipse Persistence Tools
–>
<hibernate-mapping>
<class name=”com.entity.CmpShowmesfirst” table=”CMP_SHOWMESFIRST” schema=”CMS_SYSTEM”>
<id name=”csfId” type=”java.math.BigDecimal”>
<column name=”CSF_ID” precision=”22″ scale=”0″ />
<generator class=”sequence” />
</id>
<property name=”csfTitle” type=”java.lang.String”>
<column name=”CSF_TITLE” length=”40″ />
</property>
<property name=”csfContent” type=”java.lang.String”>
<column name=”CSF_CONTENT” length=”0″ />
</property>
<property name=”csfPicid” type=”java.math.BigDecimal”>
<column name=”CSF_PICID” precision=”22″ scale=”0″ />
</property>
<property name=”csfTypeid” type=”java.math.BigDecimal”>
<column name=”CSF_TYPEID” precision=”22″ scale=”0″ />
</property>
<set name=”cmpsmfpic” cascade=”all”>
<key column=”CSP_CSFID”/>
<one-to-many class=”com.entity.CmpSmfPic”/>
</set>
</class>
</hibernate-mapping>
CmpSmfPic.hbm.xml:
<?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”>
<!–
Mapping file autogenerated by MyEclipse Persistence Tools
–>
<hibernate-mapping>
<class name=”com.entity.CmpSmfPic” table=”CMP_SMF_PIC” schema=”CMS_SYSTEM”>
<id name=”cspId” type=”java.math.BigDecimal”>
<column name=”CSP_ID” precision=”22″ scale=”0″ />
<generator class=”sequence” />
</id>
<property name=”cspCsfid” type=”java.math.BigDecimal”>
<column name=”CSP_CSFID” precision=”22″ scale=”0″ />
</property>
<property name=”cspPic” type=”java.lang.String”>
<column name=”CSP_PIC” length=”100″ />
</property>
<many-to-one name=”cmpshowmesfirst” class=”com.entity.CmpSmfPic” cascade=”all”>
<column name=”CSP_CSFID”/>
</many-to-one>
</class>
</hibernate-mapping>