• 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
EOGeneration and inner types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOGeneration and inner types


  • Subject: EOGeneration and inner types
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Sat, 11 Apr 2009 13:58:42 -0400

Hi All,

I need some help in modifying my _WonderEntity.java to fix the accessor method for a property that uses an inner type.  But I'm not familiar with the velocity templates.

My EO class Client uses a Status enumerated type defined inside the Client class.  In other words, Status is an inner enumerated type.  In my eomodel I click the status property and then in the Class field I enter my.app.model.Client$Status.  That allows EOF to find my Status inner type and instantiate it as I fetch or save Client objects.

However, EOGeneration does not seem to handle the $ sign correctly.  My accessor methods look like this:

  public my.app.model.Client$Status status() {
    return (my.app.model.Client$Status) storedValueForKey("status");
  }

  public void setStatus(my.app.model.Client$Status value) {
    if (_Client.LOG.isDebugEnabled()) {
    _Client.LOG.debug( "updating status from " + status() + " to " + value);
    }
    takeStoredValueForKey(value, "status");
  }

Notice the $ sign.  I know that if I simply replace the $ with a "." then EVERYTHING works great.  I looked at the _WonderEntity.java inside one of the jars for the WOLips plug in and I think this is the part that is responsible for generating the accessor methods:

  public $attribute.javaClassName ${attribute.name}() {
    return ($attribute.javaClassName) storedValueForKey("$attribute.name");
  }

  public void set${attribute.capitalizedName}($attribute.javaClassName value) {
    if (${entity.prefixClassNameWithoutPackage}.LOG.isDebugEnabled()) {
     ${entity.prefixClassNameWithoutPackage}.LOG.debug( "updating $attribute.name from " + ${attribute.name}() + " to " + value);
    }
    takeStoredValueForKey(value, "$attribute.name");
  }

How should I modify this so that it replaces the "$" sign in $attribute.javaClassName with a "."


 _______________________________________________
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

  • Prev by Date: Re: ERXMigrationDatabase and postUpgrade
  • Next by Date: Re: ERXEC Exception
  • Previous by thread: [MEET] Chicago CocoaHeads / CAWUG Tuesday 4/14
  • Next by thread: Re: Using JNDI ?
  • Index(es):
    • Date
    • Thread