Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 1.78 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. HibernateTools Reverse Engineering tool does not add Annotation for generator
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <!DOCTYPE
  4. hibernate-reverse-engineering PUBLIC
  5. "-//Hibernate/Hibernate Reverse
  6. Engineering DTD 3.0//EN"
  7. "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd"
  8. <hibernate-reverse-engineering>
  9.   <table-filter match-name="products" match-catalog="test"></table-filter>
  10.   <table catalog="test" name="products">
  11.     <primary-key>
  12.       <generator class="native"></generator>
  13.       <key-column name="product_id"property="product_id" />
  14.     </primary-key>
  15.   </table>
  16. </hibernate-reverse-engineering>
  17.        
  18. // default package
  19. // Generated Jan 21, 2011 8:27:16 PM by Hibernate Tools 3.3.0.GA
  20.  
  21. import javax.persistence.Column;
  22. import javax.persistence.Entity;
  23. import javax.persistence.Id;
  24. import javax.persistence.Table;
  25.  
  26. /**
  27.  * Products generated by hbm2java
  28.  */
  29. @Entity
  30. @Table(name = "products", catalog = "test")
  31. public class Products implements java.io.Serializable {
  32.  
  33.  private String productId;
  34.  private String productName;
  35.  
  36.  public Products() {
  37.  }
  38.  
  39.  public Products(String productId) {
  40.   this.productId = productId;
  41.  }
  42.  
  43.  public Products(String productId, String productName) {
  44.   this.productId = productId;
  45.   this.productName = productName;
  46.  }
  47.  
  48.  @Id
  49.  @Column(name = "product_id", unique = true, nullable = false, length = 50)
  50.  public String getProductId() {
  51.   return this.productId;
  52.  }
  53.  
  54.  public void setProductId(String productId) {
  55.   this.productId = productId;
  56.  }
  57.  
  58.  @Column(name = "product_name", length = 200)
  59.  public String getProductName() {
  60.   return this.productName;
  61.  }
  62.  
  63.  public void setProductName(String productName) {
  64.   this.productName = productName;
  65.  }
  66.  
  67. }
  68.        
  69. <key-column name="product_id" property="product_id" />
  70.        
  71. <key-column name="product_id" property="productId" />