08-17-07 12:12 PM
Hi,
§18.14
"When contained in a class element:
- The field-name attribute is required; it associates a persistent field wit
h
the named property."
AFAIR field-name attribute is used for generated classes. It should be optio
nal
when contained in class or interface elements.
e.g.
//user given interface
interface Animal
{
@Persistent(fieldname="kind2")
int getKind();
}
//jdo implementation generated class
class GeneratedAnimal
{
int kind2;
int getKind()
{
return kind2;
}
}
or
---
//user given abstract class
abstract Jedi
{
int jedilevel;
@Persistent(fieldname="jedilevel")
int getLevel();
}
//jdo implementation generated class
class GeneratedJedi
{
int jedilevel;
int getLevel()
{
return jedilevel;
}
}
The new wording could be:
"When contained in a class or interface element:
- The field-name attribute is optional; it associates a persistent property
with
a named field."
[ Post a follow-up to this message ]
|