struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pillay, Kiren KN" <Kiren.Pil...@standardbank.co.za>
Subject Indexed Bean Copy
Date Tue, 11 Jul 2006 08:15:14 GMT
Hi

I've got a domain object which stored an indexed array of objects.

<-- Extract of Domain Object
public class GroupExposures {

	private Exposure [] exposures=new Exposure[]{new Exposure(),new
Exposure(),new Exposure()};
	
	  
	class Exposure{
	float totalSBSABroughtForward;
	float otherSBSAFacilitiesPerParagraph;
	float SBSAExposureToTheApplicant;
	float otherSBGFacilitiesPerParagraph;
	float totalSBGExposureToTheApplicant;
	float otherSBSAFacilitesWholeGroup;
	float otherSBGFacilitiesWholeGroup;
	float totalSBGExposureWholeGroup;
	float SBGBorrowingsWholeGroup;
	float otherBankBorrowings;
	float otherLenders;
	float totalArrangedBorrowings;
	}
	
public float getOtherLenders(int type) {
		return exposures[type].otherLenders;
	}
	public void setOtherLenders(float otherLenders,int type) {
		exposures[type].otherLenders = otherLenders;
	}

-->
Form extract:
public float getOtherLendersUtilisation(){return
OtherLendersUtilisation;
	}

----

In my Action class I have to say the following:
 
groupExposures.setOtherLenders(groupExposuresForm.getOtherLendersUtilisa
tion(),LimitTypes.UTILISATION);	
 

------
The way this class is set up, I cannot use BeanUtils.copy() to copy the
values across. The Action class is huge because of this and it was quite
tedious putting in the code. Is there a quicker, easier way to do this? 

Regards
Kiren Pillay



__________________________________________________________________________________________________________________________________

Standard Bank Disclaimer and Confidentiality Note

This e-mail, its attachments and any rights attaching hereto are, unless the context clearly
indicates otherwise, the property of Standard Bank Group Limited
and/or its subsidiaries ("the Group"). It is confidential, private and intended for the addressee
only. Should you not be the addressee and receive this e-mail by
mistake, kindly notify the sender, and delete this e-mail, immediately and do not disclose
or use same in any manner whatsoever. Views and opinions
expressed in this e-mail are those of the sender unless clearly stated as those of the Group.
The Group accepts no liability whatsoever for any loss or
damages whatsoever and howsoever incurred, or suffered, resulting, or arising, from the use
of this email or its attachments. The Group does not warrant the integrity
of this e-mail nor that it is free of errors, viruses, interception or interference. Licensed
divisions of the Standard Bank Group are authorised financial services providers
in terms of the Financial Advisory and Intermediary Services Act, No 37 of 2002 (FAIS).
For information about the Standard Bank Group Limited visit our website http://www.standardbank.co.za
___________________________________________________________________________________________________________________________________

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message