package com.cn.fastunit.pojo;/**
 * AbstractOdmStockTbId generated by MyEclipse Persistence Tools
 */public abstract class AbstractOdmStockTbId implements java.io.Serializable { // Fields private String companycode; private String partscode; // Constructors /** default constructor */
public AbstractOdmStockTbId() {
} /** full constructor */
public AbstractOdmStockTbId(String companycode, String partscode) {
this.companycode = companycode;
this.partscode = partscode;
} // Property accessors public String getCompanycode() {
return this.companycode;
} public void setCompanycode(String companycode) {
this.companycode = companycode;
} public String getPartscode() {
return this.partscode;
} public void setPartscode(String partscode) {
this.partscode = partscode;
} public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof AbstractOdmStockTbId))
return false;
AbstractOdmStockTbId castOther = (AbstractOdmStockTbId) other; return ((this.getCompanycode() == castOther.getCompanycode()) || (this
.getCompanycode() != null
&& castOther.getCompanycode() != null && this.getCompanycode()
.equals(castOther.getCompanycode())))
&& ((this.getPartscode() == castOther.getPartscode()) || (this
.getPartscode() != null
&& castOther.getPartscode() != null && this
.getPartscode().equals(castOther.getPartscode())));
} public int hashCode() {
int result = 17; result = 37
* result
+ (getCompanycode() == null ? 0 : this.getCompanycode()
.hashCode());
result = 37 * result
+ (getPartscode() == null ? 0 : this.getPartscode().hashCode());
return result;
}}
-------------------------------------------------------------------------------
package com.cn.fastunit.pojo;// Generated by MyEclipse Persistence Toolsimport java.util.Date;/**
 * OdmStockTb generated by MyEclipse Persistence Tools
 */
public class OdmStockTb extends AbstractOdmStockTb implements
java.io.Serializable { // Constructors /** default constructor */
public OdmStockTb() {
} /** minimal constructor */
public OdmStockTb(OdmStockTbId id) {
super(id);
} /** full constructor */
public OdmStockTb(OdmStockTbId id, String locationno, String unit,
Long onhandquantity, Long frozenquantity, Double costprice,
Double onhandamount, Long criterquantity, Long minquantity,
Long onorderquantity, String firstorderedflag, String deleteflag,
Long updatecount, String createuser, Date createdate,
String updateuser, Date updatetime) {
super(id, locationno, unit, onhandquantity, frozenquantity, costprice,
onhandamount, criterquantity, minquantity, onorderquantity,
firstorderedflag, deleteflag, updatecount, createuser,
createdate, updateuser, updatetime);
}}
----------------------------------------------------------------------------package com.cn.fastunit.pojo;// Generated by MyEclipse Persistence Tools/**
 * OdmStockTbId generated by MyEclipse Persistence Tools
 */
public class OdmStockTbId extends AbstractOdmStockTbId implements
java.io.Serializable { // Constructors /** default constructor */
public OdmStockTbId() {
} /** full constructor */
public OdmStockTbId(String companycode, String partscode) {
super(companycode, partscode);
}}
 ---------------OdmStockTb.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.cn.fastunit.pojo.OdmStockTb" table="ODM_STOCK_TB" schema="SOCDEV">
        <composite-id name="id" class="com.cn.fastunit.pojo.OdmStockTbId">
            <key-property name="companycode" type="string">
                <column name="COMPANYCODE" length="20" />
            </key-property>
            <key-property name="partscode" type="string">
                <column name="PARTSCODE" length="20" />
            </key-property>
        </composite-id>
        <property name="locationno" type="string">
            <column name="LOCATIONNO" length="32" />
        </property>
        <property name="unit" type="string">
            <column name="UNIT" length="4" />
        </property>
        <property name="onhandquantity" type="java.lang.Long">
            <column name="ONHANDQUANTITY" precision="10" scale="0" />
        </property>
        <property name="frozenquantity" type="java.lang.Long">
            <column name="FROZENQUANTITY" precision="10" scale="0" />
        </property>
        <property name="costprice" type="java.lang.Double">
            <column name="COSTPRICE" precision="15" />
        </property>
        <property name="onhandamount" type="java.lang.Double">
            <column name="ONHANDAMOUNT" precision="15" />
        </property>
        <property name="criterquantity" type="java.lang.Long">
            <column name="CRITERQUANTITY" precision="10" scale="0" />
        </property>
        <property name="minquantity" type="java.lang.Long">
            <column name="MINQUANTITY" precision="10" scale="0" />
        </property>
        <property name="onorderquantity" type="java.lang.Long">
            <column name="ONORDERQUANTITY" precision="10" scale="0" />
        </property>
        <property name="firstorderedflag" type="java.lang.String">
            <column name="FIRSTORDEREDFLAG" length="2" />
        </property>
        <property name="deleteflag" type="java.lang.String">
            <column name="DELETEFLAG" length="1" />
        </property>
        <property name="updatecount" type="java.lang.Long">
            <column name="UPDATECOUNT" precision="3" scale="0" />
        </property>
        <property name="createuser" type="string">
            <column name="CREATEUSER" length="40" />
        </property>
        <property name="createdate" type="java.util.Date">
            <column name="CREATEDATE" length="7" />
        </property>
        <property name="updateuser" type="string">
            <column name="UPDATEUSER" length="40" />
        </property>
        <property name="updatetime" type="java.util.Date">
            <column name="UPDATETIME" length="7" />
        </property>
    </class>
</hibernate-mapping>如果不做任何修改,直接使用自动生成出来的以上类,会不会出现什么问题????????要不要修改此代码?如要修改,请给个修改后的理想代码?谢谢!!!