• 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
Custom Attribute Questions.....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom Attribute Questions.....


  • Subject: Custom Attribute Questions.....
  • From: Kieran Kelleher <email@hidden>
  • Date: Wed, 15 Jun 2005 11:24:10 -0400

I need a little Customer EO Attribute advice so I don't end up missing the beach this weekend like Chuck Hill did on page 43 of PWO :-)

I have a custom class, EncryptedEOAttribute, that wraps a String ivar named _decodedValue

The class has value() and setValue() that return and set the raw clear string.

It has a conversion method public String toEncodedString() that encodes the string into the database.

It has a factory method that decodes an encoded string from the database to create an instance (wrapping the clear string):
public static EncryptedEOAttribute createInstanceFromEncodedString( String encodedString )


It has a display method toString() that masks the clear string by replacing most of the characters with an asterisk.

In my app, I plan to simply use setValue to update the instance's _decodedValue ivar.

For a class like this, do I have to worry about the object mutability snapshot saving problem since changes only occur when setValue is called and the String ivar _decodedValue is changed?

If so, how would I approach it ..... do I need to design my EncryptedEOAttribute class to be immutable (basically remove setValue method) and create a new instance every time a new _decodedValue is to be stored? Does EOF just compare the object reference to the snapshot reference or does it use the conversion method return value for snapshot comparison before deciding to save.

Regards,

-Kieran
________________________________________________________________
Blog: http://webobjects.webhop.org/

_______________________________________________
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: Custom Attribute Questions.....
      • From: Hugi Thordarson <email@hidden>
  • Prev by Date: Re: Rumor... Talk of Opening WO at WWDC
  • Next by Date: Re: PostgreSQL plugin
  • Previous by thread: Re: Rumor... Talk of Opening WO at WWDC
  • Next by thread: Re: Custom Attribute Questions.....
  • Index(es):
    • Date
    • Thread