Quote:
...
<set name="tenderOffers" inverse="true" batch-size="10">
<key column="waterOffer"/>
<one-to-many class="com.wf.core.TenderOffer"/>
</set>
I use following class to set the object;
Code:
public TenderOffer getTheOffer() {
Set theOffers = getTenderOffers();
Iterator it = theOffers.iterator();
while (it.hasNext()) {
TenderOffer to = (TenderOffer) it.next();
if (to.getOfferer().getId().equals(getBuyer().getId())
&& to.getAccepted().booleanValue()) {
return to;
}
}
return null;
}
Insted of getting the entire object, what would be the best way to increase the preformance, how can i get the pointer to the object?