HI
thnx for ur quick reply.I am attaching all my files relaed to this issue and explaining all these below.
VendorServiceTransport.hbm.xml
<?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="com.ifs.app.model.adaptors.VendorServiceTransportAdaptor"
table="vendor_service_transport" lazy="true">
<id name="vendorSrvTptId" type="java.lang.Integer"
column="VENDOR_SRV_TPT_ID">
<generator class="increment" />
</id>
<property name="syncEnabled" type="java.lang.Integer"
column="SYNC_ENABLED" not-null="false" length="1" />
<property name="scheduleEnabled" type="java.lang.Integer"
column="SCHEDULE_ENABLED" not-null="false" length="1" />
<property name="markedForDelete" type="java.lang.Integer"
column="MARKED_FOR_DELETE" not-null="false" length="1" />
<many-to-one name="transport"
class="com.ifs.app.model.adaptors.TransportAdaptor"
not-null="false">
<column name="TRANSPORT_ID" />
</many-to-one>
<many-to-one name="responseTransportId"
class="com.ifs.app.model.adaptors.TransportAdaptor"
not-null="false">
<column name="RESPONSE_TRANSPORT_ID" />
</many-to-one>
<many-to-one name="vendorService"
class="com.ifs.app.model.adaptors.VendorServiceAdaptor"
not-null="false">
<column name="VENDOR_SERVICE_ID" />
</many-to-one>
<many-to-one name="scheduleGroup"
class="com.ifs.app.model.adaptors.ScheduleGroupAdaptor"
not-null="false">
<column name="SCHEDULE_GROUP_ID" />
</many-to-one>
<many-to-one name="encryptAlgo"
class="com.ifs.app.model.adaptors.EncryptAlgoAdaptor"
not-null="false">
<column name="ENCRYPT_ALGO_ID" />
</many-to-one>
<set name="configDatas" lazy="true" inverse="true" cascade="all"
order-by="CONFIG_DATA_ID">
<key>
<column name="VENDOR_SRV_TPT_ID" />
</key>
<one-to-many
class="com.ifs.app.model.adaptors.ConfigDataAdaptor" />
</set>
</class>
</hibernate-mapping>
VendorService.hbm.xml
<?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="com.ifs.app.model.adaptors.VendorServiceAdaptor"
table="vendor_service" lazy="true">
<id name="vendorServiceId" type="java.lang.Integer"
column="VENDOR_SERVICE_ID">
<generator class="increment" />
</id>
<property name="serviceHandler" type="java.lang.String"
column="SERVICE_HANDLER" not-null="false" length="256" />
<property name="responseHandler" type="java.lang.String"
column="RESPONSE_HANDLER" not-null="false" length="256" />
<many-to-one name="vendors"
class="com.ifs.app.model.adaptors.VendorsAdaptor" not-null="true">
<column name="VENDOR_ID" />
</many-to-one>
<many-to-one name="formatDesc"
class="com.ifs.app.model.adaptors.FormatDescAdaptor"
not-null="true">
<column name="FORMAT_ID" />
</many-to-one>
<many-to-one name="serviceDesc"
class="com.ifs.app.model.adaptors.ServiceDescAdaptor"
not-null="true">
<column name="SERVICE_ID" />
</many-to-one>
<property name="markedForDelete" type="java.lang.Integer"
column="MARKED_FOR_DELETE" not-null="false" length="1" />
<one-to-one name="vendorServiceTransport"
class="com.ifs.app.model.adaptors.VendorServiceTransportAdaptor" outer-join="auto"
property-ref="vendorService" />
<!--<set name="vendorServiceTransports" lazy="true" inverse="true"
cascade="all" where="MARKED_FOR_DELETE=0"
order-by="VENDOR_SRV_TPT_ID">
<key>
<column name="VENDOR_SERVICE_ID" />
</key>
<one-to-many
class="com.ifs.app.model.adaptors.VendorServiceTransportAdaptor" />
</set>
--><set name="vendorSubservices" lazy="true" inverse="true"
cascade="all" where="MARKED_FOR_DELETE=0"
order-by="VENDOR_SUBSERVICE_ID">
<key>
<column name="VENDOR_SERVICE_ID" />
</key>
<one-to-many
class="com.ifs.app.model.adaptors.VendorSubserviceAdaptor" />
</set>
</class>
</hibernate-mapping>
VendorService.java(Entity)
package com.ifs.app.model.entities;
import java.io.Serializable;
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;
public class VendorService extends com.ifs.app.model.BaseDomain implements
Serializable {
private Integer vendorServiceId;
private com.ifs.app.model.entities.Vendors vendors;
private com.ifs.app.model.entities.FormatDesc formatDesc;
private com.ifs.app.model.entities.ServiceDesc serviceDesc;
private String serviceHandler;
private String responseHandler;
private Set vendorSubservices;
private com.ifs.app.model.entities.VendorServiceTransport vendorServiceTransport;
private Integer markedForDelete;
/** full constructor */
public VendorService(Integer vendorServiceId,
com.ifs.app.model.entities.Vendors vendors,
com.ifs.app.model.entities.FormatDesc formatDesc,
com.ifs.app.model.entities.ServiceDesc serviceDesc,
String responseHandler, String serviceHandler,
com.ifs.app.model.entities.VendorServiceTransport vendorServiceTransport, Set vendorSubservices,
Integer markedForDelete) {
this.vendorServiceId = vendorServiceId;
this.vendors = vendors;
this.formatDesc = formatDesc;
this.serviceDesc = serviceDesc;
this.vendorServiceTransport = vendorServiceTransport;
this.serviceHandler = serviceHandler;
this.responseHandler = responseHandler;
this.vendorSubservices = vendorSubservices;
this.markedForDelete = markedForDelete;
}
/** default constructor */
public VendorService() {
}
/** minimal constructor */
public VendorService(Integer vendorServiceId,
com.ifs.app.model.entities.Vendors vendors,
com.ifs.app.model.entities.FormatDesc formatDesc,
com.ifs.app.model.entities.ServiceDesc serviceDesc,
com.ifs.app.model.entities.VendorServiceTransport vendorServiceTransport, Set vendorSubservices) {
this.vendorServiceId = vendorServiceId;
this.vendors = vendors;
this.formatDesc = formatDesc;
this.serviceDesc = serviceDesc;
this.vendorServiceTransport = vendorServiceTransport;
this.vendorSubservices = vendorSubservices;
}
public Integer getVendorServiceId() {
return this.vendorServiceId;
}
public void setVendorServiceId(Integer vendorServiceId) {
this.vendorServiceId = vendorServiceId;
}
public com.ifs.app.model.entities.Vendors getVendors() {
return this.vendors;
}
public void setVendors(com.ifs.app.model.entities.Vendors vendors) {
this.vendors = vendors;
}
public com.ifs.app.model.entities.FormatDesc getFormatDesc() {
return this.formatDesc;
}
public void setFormatDesc(com.ifs.app.model.entities.FormatDesc formatDesc) {
this.formatDesc = formatDesc;
}
public String getResponseHandler() {
return this.responseHandler;
}
public void setResponseHandler(String responseHandler) {
this.responseHandler = responseHandler;
}
public com.ifs.app.model.entities.ServiceDesc getServiceDesc() {
return this.serviceDesc;
}
public void setServiceDesc(
com.ifs.app.model.entities.ServiceDesc serviceDesc) {
this.serviceDesc = serviceDesc;
}
public String getServiceHandler() {
return this.serviceHandler;
}
public void setServiceHandler(String serviceHandler) {
this.serviceHandler = serviceHandler;
}
public Set getVendorSubservices() {
return this.vendorSubservices;
}
public void setVendorSubservices(Set vendorSubservices) {
this.vendorSubservices = vendorSubservices;
}
public String toString() {
return new ToStringBuilder(this).append("vendorServiceId",
getVendorServiceId()).toString();
}
public boolean equals(Object other) {
if ((this == other))
return true;
if (!(other instanceof VendorService))
return false;
VendorService castOther = (VendorService) other;
return new EqualsBuilder().append(this.getVendorServiceId(),
castOther.getVendorServiceId()).isEquals();
}
public int hashCode() {
return new HashCodeBuilder().append(getVendorServiceId()).toHashCode();
}
public com.ifs.app.model.entities.VendorServiceTransport getVendorServiceTransport() {
return vendorServiceTransport;
}
public void setVendorServiceTransport(
com.ifs.app.model.entities.VendorServiceTransport vendorServiceTransport) {
this.vendorServiceTransport = vendorServiceTransport;
}
/**
* @return Returns the markedForDelete.
*/
public Integer getMarkedForDelete() {
return markedForDelete;
}
/**
* @param markedForDelete
* The markedForDelete to set.
*/
public void setMarkedForDelete(Integer markedForDelete) {
this.markedForDelete = markedForDelete;
}
}
VendorServiceTransport.java(Entity)
package com.ifs.app.model.entities;
import java.io.Serializable;
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;
public class VendorServiceTransport extends com.ifs.app.model.BaseDomain
implements Serializable {
private Integer vendorSrvTptId;
private com.ifs.app.model.entities.Transport transport;
private com.ifs.app.model.entities.VendorService vendorService;
private com.ifs.app.model.entities.ScheduleGroup scheduleGroup;
private com.ifs.app.model.entities.Transport responseTransportId;
private Integer markedForDelete;
private Integer syncEnabled;
private com.ifs.app.model.entities.EncryptAlgo encryptAlgo;
private Integer scheduleEnabled;
private Set configDatas;
/** full constructor */
public VendorServiceTransport(Integer vendorSrvTptId,
com.ifs.app.model.entities.Transport transport,
com.ifs.app.model.entities.VendorService vendorService,
com.ifs.app.model.entities.ScheduleGroup scheduleGroup,
com.ifs.app.model.entities.Transport responseTransportId,
Integer markedForDelete,
com.ifs.app.model.entities.EncryptAlgo encryptAlgo,
Integer scheduleEnabled, Integer syncEnabled, Set configDatas) {
this.vendorSrvTptId = vendorSrvTptId;
this.transport = transport;
this.vendorService = vendorService;
this.scheduleGroup = scheduleGroup;
this.responseTransportId = responseTransportId;
this.markedForDelete = markedForDelete;
this.encryptAlgo = encryptAlgo;
this.scheduleEnabled = scheduleEnabled;
this.syncEnabled = syncEnabled;
this.configDatas = configDatas;
}
/** default constructor */
public VendorServiceTransport() {
}
/** minimal constructor */
public VendorServiceTransport(Integer vendorSrvTptId, Set configDatas) {
this.vendorSrvTptId = vendorSrvTptId;
this.configDatas = configDatas;
}
public Integer getVendorSrvTptId() {
return this.vendorSrvTptId;
}
public void setVendorSrvTptId(Integer vendorSrvTptId) {
this.vendorSrvTptId = vendorSrvTptId;
}
public com.ifs.app.model.entities.Transport getResponseTransportId() {
return this.responseTransportId;
}
public void setResponseTransportId(
com.ifs.app.model.entities.Transport responseTransportId) {
this.responseTransportId = responseTransportId;
}
public com.ifs.app.model.entities.Transport getTransport() {
return this.transport;
}
public void setTransport(com.ifs.app.model.entities.Transport transport) {
this.transport = transport;
}
public com.ifs.app.model.entities.VendorService getVendorService() {
return this.vendorService;
}
public void setVendorService(
com.ifs.app.model.entities.VendorService vendorService) {
this.vendorService = vendorService;
}
public com.ifs.app.model.entities.ScheduleGroup getScheduleGroup() {
return this.scheduleGroup;
}
public void setScheduleGroup(
com.ifs.app.model.entities.ScheduleGroup scheduleGroup) {
this.scheduleGroup = scheduleGroup;
}
public Integer getMarkedForDelete() {
return this.markedForDelete;
}
public void setMarkedForDelete(Integer markedForDelete) {
this.markedForDelete = markedForDelete;
}
public Integer getSyncEnabled() {
return this.syncEnabled;
}
public void setSyncEnabled(Integer syncEnabled) {
this.syncEnabled = syncEnabled;
}
public Set getConfigDatas() {
return this.configDatas;
}
public void setConfigDatas(Set configDatas) {
this.configDatas = configDatas;
}
public com.ifs.app.model.entities.EncryptAlgo getEncryptAlgo() {
return this.encryptAlgo;
}
public void setEncryptAlgo(
com.ifs.app.model.entities.EncryptAlgo encryptAlgo) {
this.encryptAlgo = encryptAlgo;
}
public Integer getScheduleEnabled() {
return this.scheduleEnabled;
}
public void setScheduleEnabled(Integer scheduleEnabled) {
this.scheduleEnabled = scheduleEnabled;
}
public String toString() {
return new ToStringBuilder(this).append("vendorSrvTptId",
getVendorSrvTptId()).toString();
}
public boolean equals(Object other) {
if ((this == other))
return true;
if (!(other instanceof VendorServiceTransport))
return false;
VendorServiceTransport castOther = (VendorServiceTransport) other;
return new EqualsBuilder().append(this.getVendorSrvTptId(),
castOther.getVendorSrvTptId()).isEquals();
}
public int hashCode() {
return new HashCodeBuilder().append(getVendorSrvTptId()).toHashCode();
}
}
Below Is the code Where i am trying to get the collections from the Object
Set vendorServiceTransports = this.scheduleGroupAdaptor .getVendorServiceTransports(); Iterator itr = vendorServiceTransports.iterator();
I have attached all my related files related to this issue.If u want anything sles plz revert me back.Once again thnx a lot for the reply
Regards
Deba
|