Data Access Object is something that you write for own application. It is an object that abstract database read and writes from the web application code. So theory is that DAO for Sybase could be swapped with one for Oracle.
See "http://java.sun.com/blueprints/" http://java.sun.com/blueprints/enterprise/index.html look under DAO -- Peter Pilgrim ++44 (0)207-545-9923 ............................................ Swamped under electronic mails ---------------------------------------- Message History ---------------------------------------- From: "Annie Chang" <[EMAIL PROTECTED]> on 25/03/2002 13:59 PST Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> cc: Subject: RE: Multi Indexed & Nested properties samples? Thank you very much Peter. I have solved the issue. Your suggestion is another choice. I'm trying to find a approach to access database. I'm interested in DAO you mentioned. What's DAO and can you give me a example? Thanks in advance. Annie -----Original Message----- From: Peter Pilgrim Sent: Mon 3/25/2002 6:41 AM To: Struts Users Mailing List Cc: Subject: Re: Multi Indexed & Nested properties samples? Annie MUTATOR You will need the mutator method obviously `public void setName( String )' PREFERS INTERFACES Instead of using java.util.Vector, prefer to using an Java Collection interface java.util.List. public List getSubscriptionList() { List list = new ArrayList(); // fill her up return list; } Pros; you change the type of ``List'' in the future. Suppose a better list appears tomorrow Cons: no problem DELEGATE if you have a business object or DAO consider delegation to access. Instead copying the accessor / mutators of the DAO to the ActionForm. Let the DAO be a delegate because Struts supports ``nested bean properties'' out of the box, public class CreditDetailDAO { .... public String getAuthority() { .. .} } public class Employee extends ActionForm { // Delegate it! private CreditDetail cred; public CreditDetailDAO getCreditDetail() { return cred; } public void setCreditDetail( CreditDetailDAO c ){ this.cred = c }; } Then JSP can be written like so <bean:write name="obj" property="creditDetail.authority" /> -- Peter Pilgrim ++44 (0)207-545-9923 ............................................ Swamped under electronic mails ---------------------------------------- Message History ---------------------------------------- From: "Annie Chang" <[EMAIL PROTECTED]> on 24/03/2002 16:39 PST Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Subject: Re: Multi Indexed & Nested properties samples? Arron, I want to let the user modify all informations in one page like this way: *-------------------------------------------------------------------- | User Information: | Name:________ Telephone:_____________________ | Email:_________ Address:______________________ | | Subscriptions: | Host User Name Password Type Autoconnect | _______ ________ ________ ____ __________ | _______ ________ ________ ____ __________ | _______ ________ ________ ____ __________ | _______ ________ ________ ____ __________ | | Interested Webs: | Catalog Name URL | _______ _______ __________________________ | _______ _______ __________________________ | _______ _______ __________________________ | _______ _______ __________________________ | | | Save *---------------------------------------------------------------------- --<CUT>-- -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> (See attached file: winmail.dat) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
winmail.dat
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>