Here is the code snippets:
The main model class:
Code:
<snip>
/** The getter method for this HardwareMetaItem.
*
* @hibernate.set name="ircodes" table="opchildhardwaremetadata"
* @hibernate.collection-key column="model_id"
* @hibernate.collection-composite-element class="com.openpeak.model.HardwareMetaData"
*/
public Set getHardwareMetaData() {
return(hardwareMetaData);
}
/** The setter method for this HardwareMetaItem.
*/
public void setHardwareMetaData(Set hardwareMetaData) {
this.hardwareMetaData = hardwareMetaData;
}
<snip>
The Set mapping class:
Code:
<snip>
public class HardwareMetaData extends BaseObject implements Serializable {
private HardwareMetaItem hardwareMetaItem;
private ValueItem valueItem;
/**
* @return Returns the command.
* @hibernate.property column="value_id" type="int" not-null="true"
*/
public ValueItem getValueItem() {
return valueItem;
}
/**
* @param value The ValueItem to set.
*/
public void setValueItem(ValueItem valueItem) {
this.valueItem = valueItem;
}
/**
* @return Returns the hardwareMetaItem.
* @hibernate.property column="meta_id" type="int" not-null="true"
*/
public HardwareMetaItem getHardwareMetaItem() {
return hardwareMetaItem;
}
/**
* @param hardwareMetaItem The hardwareMetaItem to set.
*/
public void setHardwareMetaItem(HardwareMetaItem hardwareMetaItem) {
this.hardwareMetaItem = hardwareMetaItem;
}
<snip>
and the value item class(hardwaremetaitem is the same structure)
Code:
/**
* @hibernate.class table="opvalue"
*/
public class ValueItem extends BaseObject implements BaseItem, Serializable {
private Long id;
private String description;
private boolean active;
private java.util.Date modifiedDate;
<snip>
then the setters/getters/xdoclet
[/code]