• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Set String methods for Flattened Relationship Attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Set String methods for Flattened Relationship Attributes


  • Subject: Set String methods for Flattened Relationship Attributes
  • From: Janice Cheung <email@hidden>
  • Date: Wed, 19 Oct 2005 16:10:31 -0400


     Greetings!

    How do I define data types and set() and get() methods for attributes of flattened relationships?

    I am unable to manipulate the data for all attributes created by flattening relationships in my EOModeler.  For example, I cannot save nor
    update the values for these attributes, although I am able to happily modify and save the values for all original class attributes that
    are not derived from flattened relationships.  I am confident that my set() methods are the source of the issue, because it is
    the only deviant code from my set() methods for original class attributes, but I am extremely befuddled as to how to correctly
    set these strings so they can behave obediently.   

    More simply, my Server attributes are saving properly and data manipulation is a snap (yay!).
    All other attributes in the Server table that are added as a consequence of flattened relationships are NOT saving properly and
    the data cannot be manipulated.   Please help!!

    Code from flattened relationship, Server->ServerContacts:

     public String getEmailContactNames(){
        NSArray pc=(NSArray)storedValueForKey("serverContacts");
        java.util.Enumeration e = pc.objectEnumerator();
        StringBuffer tags=new StringBuffer();
        Set emails=new HashSet();
        while (e.hasMoreElements()){
           ServerContact loc=(ServerContact)e.nextElement();
           String email=loc.contact().fullName();
           if (!emails.contains(email)){
              tags.append(email);
              tags.append(",");
              emails.add(email);
         }
     }
        return tags.toString();
         }

     public void setGetEmailContactNames(String value)
      {
        value=getEmailContactNames();                                                                     <=============  how do I correctly set this value? ==================>
      }


   
Code from Server class attribute:
   
    public String dnsAlias(){
       return (String)storedValueForKey("dnsAlias");
   }


    public void setDnsAlias(String value){
       takeStoredValueForKey(value, "dnsAlias");
   }


     What am I doing wrong?  Please help me.

    Thank you very much for your time and attention.  I really appreciate your help!

     Kindest regards,
     Janice

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Set String methods for Flattened Relationship Attributes
      • From: Chuck Hill <email@hidden>
    • Re: Set String methods for Flattened Relationship Attributes
      • From: David LeBer <email@hidden>
References: 
 >WOMailDelivery Woes - Data Types incorrectly set? (From: Janice Cheung <email@hidden>)

  • Prev by Date: Re: NSDictionary and FetchSpecificationNamed usage
  • Next by Date: Localizing time
  • Previous by thread: WOMailDelivery Woes - Data Types incorrectly set?
  • Next by thread: Re: Set String methods for Flattened Relationship Attributes
  • Index(es):
    • Date
    • Thread