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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]