Hello All,
I am getting the following error please help me
Exception in thread "main" org.hibernate.InvalidMappingException: Could not parse mapping document from resource customer.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:523)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1352)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1338)
at SalesOrderUnmarshaller.main(SalesOrderUnmarshaller.java:83)
Caused by: org.hibernate.MappingException: class salesOrderSchema.SaleOrder.CustomerCustomerInfo not found while looking for property: nameStyle
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:74)
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2164)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2141)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2031)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
at org.hibernate.cfg.Configuration.add(Configuration.java:424)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)
... 7 more
Caused by: java.lang.ClassNotFoundException: salesOrderSchema.SaleOrder.CustomerCustomerInfo
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:70)
... 17 more
My java class is as follows:
Code:
package salesOrderSchema;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"salesOrderHeaderInfo",
"salesOrderDetail",
"customer",
"shipToAddress",
"billToAddress"
})
@XmlRootElement(name = "SaleOrder")
public class SaleOrder {
@XmlElement(name = "SalesOrderHeaderInfo", required = true)
protected SaleOrder.SalesOrderHeaderInfo salesOrderHeaderInfo;
@XmlElement(name = "SalesOrderDetail", required = true)
protected List<SaleOrder.SalesOrderDetail> salesOrderDetail;
@XmlElement(name = "Customer", required = true)
protected SaleOrder.Customer customer;
@XmlElement(name = "ShipToAddress")
protected TypeAddress shipToAddress;
@XmlElement(name = "BillToAddress")
protected TypeAddress billToAddress;
public SaleOrder.SalesOrderHeaderInfo getSalesOrderHeaderInfo() {
return salesOrderHeaderInfo;
}
public void setSalesOrderHeaderInfo(SaleOrder.SalesOrderHeaderInfo value) {
this.salesOrderHeaderInfo = value;
}
public List<SaleOrder.SalesOrderDetail> getSalesOrderDetail() {
if (salesOrderDetail == null) {
salesOrderDetail = new ArrayList<SaleOrder.SalesOrderDetail>();
}
return this.salesOrderDetail;
}
public SaleOrder.Customer getCustomer() {
return customer;
}
public void setCustomer(SaleOrder.Customer value) {
this.customer = value;
}
public TypeAddress getShipToAddress() {
return shipToAddress;
}
public void setShipToAddress(TypeAddress value) {
this.shipToAddress = value;
}
public TypeAddress getBillToAddress() {
return billToAddress;
}
public void setBillToAddress(TypeAddress value) {
this.billToAddress = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerInfo",
"customerAddress"
})
public static class Customer {
@XmlElement(name = "CustomerInfo", required = true)
protected SaleOrder.Customer.CustomerInfo customerInfo;
@XmlElement(name = "CustomerAddress", required = true)
protected List<SaleOrder.Customer.CustomerAddress> customerAddress;
public SaleOrder.Customer.CustomerInfo getCustomerInfo() {
return customerInfo;
}
public void setCustomerInfo(SaleOrder.Customer.CustomerInfo value) {
this.customerInfo = value;
}
public List<SaleOrder.Customer.CustomerAddress> getCustomerAddress() {
if (customerAddress == null) {
customerAddress = new ArrayList<SaleOrder.Customer.CustomerAddress>();
}
return this.customerAddress;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"custumerAddressInfo",
"address"
})
public static class CustomerAddress {
@XmlElement(name = "CustumerAddressInfo", required = true)
protected SaleOrder.Customer.CustomerAddress.CustumerAddressInfo custumerAddressInfo;
@XmlElement(name = "Address", required = true)
protected TypeAddress address;
public SaleOrder.Customer.CustomerAddress.CustumerAddressInfo getCustumerAddressInfo() {
return custumerAddressInfo;
}
public void setCustumerAddressInfo(SaleOrder.Customer.CustomerAddress.CustumerAddressInfo value) {
this.custumerAddressInfo = value;
}
public TypeAddress getAddress() {
return address;
}
public void setAddress(TypeAddress value) {
this.address = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"addressType"
})
public static class CustumerAddressInfo {
@XmlElement(name = "AddressType", required = true)
protected String addressType;
public String getAddressType() {
return addressType;
}
public void setAddressType(String value) {
this.addressType = value;
}
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"customerID",
"nameStyle",
"title",
"firstName",
"middleName",
"lastName",
"suffix",
"companyName",
"salesPerson",
"emailAddress",
"phone"
})
public static class CustomerInfo {
@XmlElement(name = "CustomerID")
protected int customerID;
@XmlElement(name = "NameStyle", required = true)
protected String nameStyle;
@XmlElement(name = "Title")
protected String title;
@XmlElement(name = "FirstName", required = true)
protected String firstName;
@XmlElement(name = "MiddleName")
protected String middleName;
@XmlElement(name = "LastName", required = true)
protected String lastName;
@XmlElement(name = "Suffix")
protected String suffix;
@XmlElement(name = "CompanyName")
protected String companyName;
@XmlElement(name = "SalesPerson")
protected String salesPerson;
@XmlElement(name = "EmailAddress")
protected String emailAddress;
@XmlElement(name = "Phone")
protected String phone;
public int getCustomerID() {
return customerID;
}
public void setCustomerID(int value) {
this.customerID = value;
}
public String getNameStyle() {
return nameStyle;
}
public void setNameStyle(String value) {
this.nameStyle = value;
}
public String getTitle() {
return title;
}
public void setTitle(String value) {
this.title = value;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String value) {
this.firstName = value;
}
public String getMiddleName() {
return middleName;
}
public void setMiddleName(String value) {
this.middleName = value;
}
public String getLastName() {
return lastName;
}
public void setLastName(String value) {
this.lastName = value;
}
public String getSuffix() {
return suffix;
}
public void setSuffix(String value) {
this.suffix = value;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String value) {
this.companyName = value;
}
public String getSalesPerson() {
return salesPerson;
}
public void setSalesPerson(String value) {
this.salesPerson = value;
}
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String value) {
this.emailAddress = value;
}
public String getPhone() {
return phone;
}
public void setPhone(String value) {
this.phone = value;
}
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"saleOrderDetailInfo",
"product"
})
public static class SalesOrderDetail {
@XmlElement(name = "SaleOrderDetailInfo", required = true)
protected SaleOrder.SalesOrderDetail.SaleOrderDetailInfo saleOrderDetailInfo;
@XmlElement(name = "Product", required = true)
protected SaleOrder.SalesOrderDetail.Product product;
public SaleOrder.SalesOrderDetail.SaleOrderDetailInfo getSaleOrderDetailInfo() {
return saleOrderDetailInfo;
}
public void setSaleOrderDetailInfo(SaleOrder.SalesOrderDetail.SaleOrderDetailInfo value) {
this.saleOrderDetailInfo = value;
}
public SaleOrder.SalesOrderDetail.Product getProduct() {
return product;
}
public void setProduct(SaleOrder.SalesOrderDetail.Product value) {
this.product = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"productInfo",
"productCategory",
"productModel"
})
public static class Product {
@XmlElement(name = "ProductInfo", required = true)
protected SaleOrder.SalesOrderDetail.Product.ProductInfo productInfo;
@XmlElement(name = "ProductCategory")
protected TypeProductCategory productCategory;
@XmlElement(name = "ProductModel")
protected SaleOrder.SalesOrderDetail.Product.ProductModel productModel;
public SaleOrder.SalesOrderDetail.Product.ProductInfo getProductInfo() {
return productInfo;
}
public void setProductInfo(SaleOrder.SalesOrderDetail.Product.ProductInfo value) {
this.productInfo = value;
}
public TypeProductCategory getProductCategory() {
return productCategory;
}
public void setProductCategory(TypeProductCategory value) {
this.productCategory = value;
}
public SaleOrder.SalesOrderDetail.Product.ProductModel getProductModel() {
return productModel;
}
public void setProductModel(SaleOrder.SalesOrderDetail.Product.ProductModel value) {
this.productModel = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"productID",
"name",
"productNumber",
"color",
"standardCost",
"listPrice",
"size",
"weight",
"sellStartDate",
"sellEndDate",
"discontinuedDate",
"thumbNailPhoto",
"thumbNailPhotoFileName"
})
public static class ProductInfo {
@XmlElement(name = "ProductID")
protected int productID;
@XmlElement(name = "Name", required = true)
protected String name;
@XmlElement(name = "ProductNumber", required = true)
protected String productNumber;
@XmlElement(name = "Color")
protected String color;
@XmlElement(name = "StandardCost")
protected double standardCost;
@XmlElement(name = "ListPrice")
protected double listPrice;
@XmlElement(name = "Size")
protected String size;
@XmlElement(name = "Weight")
protected BigDecimal weight;
@XmlElement(name = "SellStartDate", required = true)
protected String sellStartDate;
@XmlElement(name = "SellEndDate")
protected String sellEndDate;
@XmlElement(name = "DiscontinuedDate")
protected String discontinuedDate;
@XmlElement(name = "ThumbNailPhoto")
protected Object thumbNailPhoto;
@XmlElement(name = "ThumbNailPhotoFileName")
protected String thumbNailPhotoFileName;
public void setProductID(int value) {
this.productID = value;
}
public String getName() {
return name;
}
public void setName(String value) {
this.name = value;
}
public String getProductNumber() {
return productNumber;
}
public void setProductNumber(String value) {
this.productNumber = value;
}
public String getColor() {
return color;
}
public void setColor(String value) {
this.color = value;
}
public double getStandardCost() {
return standardCost;
}
public void setStandardCost(double value) {
this.standardCost = value;
}
public double getListPrice() {
return listPrice;
}
public void setListPrice(double value) {
this.listPrice = value;
}
public String getSize() {
return size;
}
public void setSize(String value) {
this.size = value;
}
public BigDecimal getWeight() {
return weight;
}
public void setWeight(BigDecimal value) {
this.weight = value;
}
public String getSellStartDate() {
return sellStartDate;
}
public void setSellStartDate(String value) {
this.sellStartDate = value;
}
public String getSellEndDate() {
return sellEndDate;
}
public void setSellEndDate(String value) {
this.sellEndDate = value;
}
public String getDiscontinuedDate() {
return discontinuedDate;
}
public void setDiscontinuedDate(String value) {
this.discontinuedDate = value;
}
public Object getThumbNailPhoto() {
return thumbNailPhoto;
}
public void setThumbNailPhoto(Object value) {
this.thumbNailPhoto = value;
}
public String getThumbNailPhotoFileName() {
return thumbNailPhotoFileName;
}
public void setThumbNailPhotoFileName(String value) {
this.thumbNailPhotoFileName = value;
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"productModelInfo",
"productModelProductDescription"
})
public static class ProductModel {
@XmlElement(name = "ProductModelInfo", required = true)
protected SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelInfo productModelInfo;
@XmlElement(name = "ProductModelProductDescription", required = true)
protected SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription productModelProductDescription;
public SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelInfo getProductModelInfo() {
return productModelInfo;
}
public void setProductModelInfo(SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelInfo value) {
this.productModelInfo = value;
}
public SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription getProductModelProductDescription() {
return productModelProductDescription;
}
public void setProductModelProductDescription(SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription value) {
this.productModelProductDescription = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"productModelID",
"name",
"catalogDescription"
})
public static class ProductModelInfo {
@XmlElement(name = "ProductModelID")
protected int productModelID;
@XmlElement(name = "Name", required = true)
protected String name;
@XmlElement(name = "CatalogDescription")
protected Object catalogDescription;
public int getProductModelID() {
return productModelID;
}
public void setProductModelID(int value) {
this.productModelID = value;
}
public String getName() {
return name;
}
public void setName(String value) {
this.name = value;
}
public Object getCatalogDescription() {
return catalogDescription;
}
public void setCatalogDescription(Object value) {
this.catalogDescription = value;
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"productModelProductDescriptionInfo",
"productDescription"
})
public static class ProductModelProductDescription {
@XmlElement(name = "ProductModelProductDescriptionInfo", required = true)
protected SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductModelProductDescriptionInfo productModelProductDescriptionInfo;
@XmlElement(name = "ProductDescription", required = true)
protected SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductDescription productDescription;
public SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductModelProductDescriptionInfo getProductModelProductDescriptionInfo() {
return productModelProductDescriptionInfo;
}
public void setProductModelProductDescriptionInfo(SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductModelProductDescriptionInfo value) {
this.productModelProductDescriptionInfo = value;
}
public SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductDescription getProductDescription() {
return productDescription;
}
public void setProductDescription(SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductDescription value) {
this.productDescription = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"productDescriptionID",
"productDescriptionInfo"
})
public static class ProductDescription {
@XmlElement(name = "ProductDescriptionID")
protected int productDescriptionID;
@XmlElement(name = "ProductDescriptionInfo", required = true)
protected SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductDescription.ProductDescriptionInfo productDescriptionInfo;
public int getProductDescriptionID() {
return productDescriptionID;
}
public void setProductDescriptionID(int value) {
this.productDescriptionID = value;
}
public SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductDescription.ProductDescriptionInfo getProductDescriptionInfo() {
return productDescriptionInfo;
}
public void setProductDescriptionInfo(SaleOrder.SalesOrderDetail.Product.ProductModel.ProductModelProductDescription.ProductDescription.ProductDescriptionInfo value) {
this.productDescriptionInfo = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"description"
})
public static class ProductDescriptionInfo {
@XmlElement(name = "Description", required = true)
protected String description;
public String getDescription() {
return description;
}
public void setDescription(String value) {
this.description = value;
}
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"culture"
})
public static class ProductModelProductDescriptionInfo {
@XmlElement(name = "Culture", required = true)
protected String culture;
public String getCulture() {
return culture;
}
public void setCulture(String value) {
this.culture = value;
}
}
}
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"salesOrderDetailID",
"orderQty",
"unitPrice",
"unitPriceDiscount",
"lineTotal"
})
public static class SaleOrderDetailInfo {
@XmlElement(name = "SalesOrderDetailID")
protected int salesOrderDetailID;
@XmlElement(name = "OrderQty")
protected short orderQty;
@XmlElement(name = "UnitPrice")
protected double unitPrice;
@XmlElement(name = "UnitPriceDiscount")
protected double unitPriceDiscount;
@XmlElement(name = "LineTotal")
protected double lineTotal;
public int getSalesOrderDetailID() {
return salesOrderDetailID;
}
public void setSalesOrderDetailID(int value) {
this.salesOrderDetailID = value;
}
public short getOrderQty() {
return orderQty;
}
public void setOrderQty(short value) {
this.orderQty = value;
}
public double getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(double value) {
this.unitPrice = value;
}
/**
* Gets the value of the unitPriceDiscount property.
*
*/
public double getUnitPriceDiscount() {
return unitPriceDiscount;
}
/**
* Sets the value of the unitPriceDiscount property.
*
*/
public void setUnitPriceDiscount(double value) {
this.unitPriceDiscount = value;
}
/**
* Gets the value of the lineTotal property.
*
*/
public double getLineTotal() {
return lineTotal;
}
/**
* Sets the value of the lineTotal property.
*
*/
public void setLineTotal(double value) {
this.lineTotal = value;
}
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"salesOrderID",
"revisionNumber",
"orderDate",
"dueDate",
"shipDate",
"status",
"onlineOrderFlag",
"salesOrderNumber",
"purchaseOrderNumber",
"accountNumber",
"shipMethod",
"creditCardApprovalCode",
"subTotal",
"taxAmt",
"freight",
"totalDue",
"comment"
})
public static class SalesOrderHeaderInfo {
@XmlElement(name = "SalesOrderID")
protected int salesOrderID;
@XmlElement(name = "RevisionNumber")
@XmlSchemaType(name = "unsignedByte")
protected short revisionNumber;
@XmlElement(name = "OrderDate", required = true)
protected String orderDate;
@XmlElement(name = "DueDate", required = true)
protected String dueDate;
@XmlElement(name = "ShipDate")
protected String shipDate;
@XmlElement(name = "Status")
@XmlSchemaType(name = "unsignedByte")
protected short status;
@XmlElement(name = "OnlineOrderFlag", required = true)
protected String onlineOrderFlag;
@XmlElement(name = "SalesOrderNumber", required = true)
protected String salesOrderNumber;
@XmlElement(name = "PurchaseOrderNumber")
protected String purchaseOrderNumber;
@XmlElement(name = "AccountNumber")
protected String accountNumber;
@XmlElement(name = "ShipMethod", required = true)
protected String shipMethod;
@XmlElement(name = "CreditCardApprovalCode")
protected String creditCardApprovalCode;
@XmlElement(name = "SubTotal")
protected double subTotal;
@XmlElement(name = "TaxAmt")
protected double taxAmt;
@XmlElement(name = "Freight")
protected double freight;
@XmlElement(name = "TotalDue")
protected double totalDue;
@XmlElement(name = "Comment")
protected String comment;
/**
* Gets the value of the salesOrderID property.
*
*/
public int getSalesOrderID() {
return salesOrderID;
}
/**
* Sets the value of the salesOrderID property.
*
*/
public void setSalesOrderID(int value) {
this.salesOrderID = value;
}
/**
* Gets the value of the revisionNumber property.
*
*/
public short getRevisionNumber() {
return revisionNumber;
}
/**
* Sets the value of the revisionNumber property.
*
*/
public void setRevisionNumber(short value) {
this.revisionNumber = value;
}
/**
* Gets the value of the orderDate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOrderDate() {
return orderDate;
}
/**
* Sets the value of the orderDate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOrderDate(String value) {
this.orderDate = value;
}
/**
* Gets the value of the dueDate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDueDate() {
return dueDate;
}
/**
* Sets the value of the dueDate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDueDate(String value) {
this.dueDate = value;
}
/**
* Gets the value of the shipDate property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getShipDate() {
return shipDate;
}
/**
* Sets the value of the shipDate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setShipDate(String value) {
this.shipDate = value;
}
/**
* Gets the value of the status property.
*
*/
public short getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
*/
public void setStatus(short value) {
this.status = value;
}
/**
* Gets the value of the onlineOrderFlag property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnlineOrderFlag() {
return onlineOrderFlag;
}
/**
* Sets the value of the onlineOrderFlag property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnlineOrderFlag(String value) {
this.onlineOrderFlag = value;
}
/**
* Gets the value of the salesOrderNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSalesOrderNumber() {
return salesOrderNumber;
}
/**
* Sets the value of the salesOrderNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSalesOrderNumber(String value) {
this.salesOrderNumber = value;
}
/**
* Gets the value of the purchaseOrderNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPurchaseOrderNumber() {
return purchaseOrderNumber;
}
/**
* Sets the value of the purchaseOrderNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPurchaseOrderNumber(String value) {
this.purchaseOrderNumber = value;
}
/**
* Gets the value of the accountNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAccountNumber() {
return accountNumber;
}
/**
* Sets the value of the accountNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAccountNumber(String value) {
this.accountNumber = value;
}
/**
* Gets the value of the shipMethod property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getShipMethod() {
return shipMethod;
}
/**
* Sets the value of the shipMethod property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setShipMethod(String value) {
this.shipMethod = value;
}
/**
* Gets the value of the creditCardApprovalCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCreditCardApprovalCode() {
return creditCardApprovalCode;
}
/**
* Sets the value of the creditCardApprovalCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCreditCardApprovalCode(String value) {
this.creditCardApprovalCode = value;
}
/**
* Gets the value of the subTotal property.
*
*/
public double getSubTotal() {
return subTotal;
}
/**
* Sets the value of the subTotal property.
*
*/
public void setSubTotal(double value) {
this.subTotal = value;
}
/**
* Gets the value of the taxAmt property.
*
*/
public double getTaxAmt() {
return taxAmt;
}
/**
* Sets the value of the taxAmt property.
*
*/
public void setTaxAmt(double value) {
this.taxAmt = value;
}
/**
* Gets the value of the freight property.
*
*/
public double getFreight() {
return freight;
}
/**
* Sets the value of the freight property.
*
*/
public void setFreight(double value) {
this.freight = value;
}
/**
* Gets the value of the totalDue property.
*
*/
public double getTotalDue() {
return totalDue;
}
/**
* Sets the value of the totalDue property.
*
*/
public void setTotalDue(double value) {
this.totalDue = value;
}
/**
* Gets the value of the comment property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getComment() {
return comment;
}
/**
* Sets the value of the comment property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setComment(String value) {
this.comment = value;
}
}
}
My config file
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping >
<class name="salesOrderSchema.SaleOrder.CustomerCustomerInfo" entity-name="CustomerInfo" table="SalesLT.Customer">
<id name="customerID" type="integer" column="CustomerID" >
<generator class="identity"/>
</id>
<property name="nameStyle">
<column name = "NameStyle"/>
</property>
<property name="title">
<column name="Title"/>
</property>
<property name="firstName">
<column name="FirstName"/>
</property>
<property name="middleName">
<column name="MiddleName"/>
</property>
<property name="lastName">
<column name="LastName"/>
</property>
<property name="suffix">
<column name="Suffix"/>
</property>
<property name="companyName">
<column name="CompanyName"/>
</property>
<property name="salesPerson">
<column name="SalesPerson"/>
</property>
<property name="emailAddress">
<column name="EmailAddress"/>
</property>
<property name="phone">
<column name="Phone"/>
</property>
</class>
</hibernate-mapping>
my hibernate config file
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=AdventureWorksLT2008;</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.connection.password">test8</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="customer.hbm.xml"/>
<mapping resource="saleorder.hbm.xml"/>
</session-factory>
</hibernate-configuration>