Here is an example of the Java Source.
It was generated through middlegen.
I used Middlegen to first generate XMLs from the DB schema and then generated the code using hbm2java.
package com.ashland.vioc.mmt.dto;
import com.ashland.vioc.adm.dto.CompEmployeeDTO;
import java.util.Set;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
public class AreaDTO extends com.ashland.vioc.core.data.BaseDTO {
/** identifier field */
private Long areaResourceId;
/** persistent field */
private String areaCd;
/** persistent field */
private String areaDesc;
/** nullable persistent field */
private String addrLine1;
/** nullable persistent field */
private String city;
/** nullable persistent field */
private String stCd;
/** nullable persistent field */
private String zipCd;
/** nullable persistent field */
private String phone1;
/** nullable persistent field */
private String addrLine2;
/** nullable persistent field */
private String phone2;
/** nullable persistent field */
private String fax;
/** nullable persistent field */
private String email;
/** persistent field */
private String actvFlg;
/** persistent field */
private String lastUpdBy;
/** nullable persistent field */
private Integer verNum;
/** persistent field */
private CompEmployeeDTO compEmployee;
/** persistent field */
private Set storePlanBudgetHeaders;
/** full constructor */
public AreaDTO(Long areaResourceId, String areaCd, String areaDesc, String addrLine1, String city, String stCd, String zipCd, String phone1, String addrLine2, String phone2, String fax, String email, String actvFlg, String lastUpdBy, Integer verNum, CompEmployeeDTO compEmployee, Set storePlanBudgetHeaders) {
this.areaResourceId = areaResourceId;
this.areaCd = areaCd;
this.areaDesc = areaDesc;
this.addrLine1 = addrLine1;
this.city = city;
this.stCd = stCd;
this.zipCd = zipCd;
this.phone1 = phone1;
this.addrLine2 = addrLine2;
this.phone2 = phone2;
this.fax = fax;
this.email = email;
this.actvFlg = actvFlg;
this.lastUpdBy = lastUpdBy;
this.verNum = verNum;
this.compEmployee = compEmployee;
this.storePlanBudgetHeaders = storePlanBudgetHeaders;
}
/** default constructor */
public AreaDTO() {
}
/** minimal constructor */
public AreaDTO(Long areaResourceId, String areaCd, String areaDesc, String actvFlg, String lastUpdBy, CompEmployeeDTO compEmployee, Set storePlanBudgetHeaders) {
this.areaResourceId = areaResourceId;
this.areaCd = areaCd;
this.areaDesc = areaDesc;
this.actvFlg = actvFlg;
this.lastUpdBy = lastUpdBy;
this.compEmployee = compEmployee;
this.storePlanBudgetHeaders = storePlanBudgetHeaders;
}
/**
* @hibernate.id
* generator-class="assigned"
* type="java.lang.Long"
* column="areaResourceId"
*
*/
public Long getAreaResourceId() {
return this.areaResourceId;
}
public void setAreaResourceId(Long areaResourceId) {
this.areaResourceId = areaResourceId;
}
/**
* @hibernate.property
* column="areaCd"
* length="3"
* not-null="true"
*
*/
public String getAreaCd() {
return this.areaCd;
}
public void setAreaCd(String areaCd) {
this.areaCd = areaCd;
}
/**
* @hibernate.property
* column="areaDesc"
* length="40"
* not-null="true"
*
*/
public String getAreaDesc() {
return this.areaDesc;
}
public void setAreaDesc(String areaDesc) {
this.areaDesc = areaDesc;
}
/**
* @hibernate.property
* column="addrLine1"
* length="50"
*
*/
public String getAddrLine1() {
return this.addrLine1;
}
public void setAddrLine1(String addrLine1) {
this.addrLine1 = addrLine1;
}
/**
* @hibernate.property
* column="city"
* length="50"
*
*/
public String getCity() {
return this.city;
}
public void setCity(String city) {
this.city = city;
}
/**
* @hibernate.property
* column="stCd"
* length="5"
*
*/
public String getStCd() {
return this.stCd;
}
public void setStCd(String stCd) {
this.stCd = stCd;
}
/**
* @hibernate.property
* column="zipCd"
* length="10"
*
*/
public String getZipCd() {
return this.zipCd;
}
public void setZipCd(String zipCd) {
this.zipCd = zipCd;
}
/**
* @hibernate.property
* column="phone1"
* length="20"
*
*/
public String getPhone1() {
return this.phone1;
}
public void setPhone1(String phone1) {
this.phone1 = phone1;
}
/**
* @hibernate.property
* column="addrLine2"
* length="50"
*
*/
public String getAddrLine2() {
return this.addrLine2;
}
public void setAddrLine2(String addrLine2) {
this.addrLine2 = addrLine2;
}
/**
* @hibernate.property
* column="phone2"
* length="20"
*
*/
public String getPhone2() {
return this.phone2;
}
public void setPhone2(String phone2) {
this.phone2 = phone2;
}
/**
* @hibernate.property
* column="fax"
* length="20"
*
*/
public String getFax() {
return this.fax;
}
public void setFax(String fax) {
this.fax = fax;
}
/**
* @hibernate.property
* column="eMail"
* length="50"
*
*/
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
/**
* @hibernate.property
* column="actvFlg"
* length="1"
* not-null="true"
*
*/
public String getActvFlg() {
return this.actvFlg;
}
public void setActvFlg(String actvFlg) {
this.actvFlg = actvFlg;
}
/**
* @hibernate.property
* column="lastUpdBy"
* length="15"
* not-null="true"
*
*/
public String getLastUpdBy() {
return this.lastUpdBy;
}
public void setLastUpdBy(String lastUpdBy) {
this.lastUpdBy = lastUpdBy;
}
/**
* @hibernate.class
* table="Area"
*
*/
public Integer getVerNum() {
return this.verNum;
}
public void setVerNum(Integer verNum) {
this.verNum = verNum;
}
/**
* @hibernate.many-to-one
* not-null="true"
* @hibernate.column name="mgrUserId"
*
*/
public CompEmployeeDTO getCompEmployee() {
return this.compEmployee;
}
public void setCompEmployee(CompEmployeeDTO compEmployee) {
this.compEmployee = compEmployee;
}
/**
* @hibernate.set
* lazy="true"
* inverse="true"
* cascade="save-update"
* @hibernate.collection-key
* column="areaResourceId"
* @hibernate.collection-one-to-many
* class="com.ashland.vioc.bud.dto.StorePlanBudgetHeaderDTO"
*
*/
public Set getStorePlanBudgetHeaders() {
return this.storePlanBudgetHeaders;
}
public void setStorePlanBudgetHeaders(Set storePlanBudgetHeaders) {
this.storePlanBudgetHeaders = storePlanBudgetHeaders;
}
public String toString() {
return new ToStringBuilder(this)
.append("areaResourceId", getAreaResourceId())
.toString();
}
public boolean equals(Object other) {
if ( !(other instanceof AreaDTO) ) return false;
AreaDTO castOther = (AreaDTO) other;
return new EqualsBuilder()
.append(this.getAreaResourceId(), castOther.getAreaResourceId())
.isEquals();
}
public int hashCode() {
return new HashCodeBuilder()
.append(getAreaResourceId())
.toHashCode();
}
}
Vibha Jindal
Tata Consultancy Services Limited
C - 56, Phase 2
Dist. Gautam Budh Nagar
Noida - 201305,Uttar Pradesh
India
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
Paul Galbraith <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 04/02/2005 06:25 PM
|
|
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> I am trying to run the HibernateDoclet task.
>
>
> No HBM is generated.
> Can someone please guide me?
>
What does the java source look like?
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
ForwardSourceID:NT00008F46
Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you |