DISCUSS remove @Field and @Property; add @Persistent
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > DISCUSS remove @Field and @Property; add @Persistent




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    DISCUSS remove @Field and @Property; add @Persistent  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 AM






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 AM

Hi Craig,

> It might be a good time (as we're almost done with this) to replace
> @Field and @Property with @Persistent. That would make it easier to
> describe that either a field or property is being described.

While I agree totally with merging @Field and @Property, the use of=20
@Persistent is not appropriate.=20

@PersistenceCapable
public class MyClass
{
 @Persistent(persistenceModifier=3DFieldP
ersistenceModifier.NONE)
String someFieldThatIsNotPersistent
}


so I tag a field that is not persistent with @Persistent ?

Any other idea for name? that suggests field/method/property ?



=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 AM






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 AM






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 AM






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 AM






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 06:11 AM

Hi Craig,
 
> Doesn't bother me as much as duplicating Field/Property all over.

Me neither, but have to play devils advocate ;-)

> This is another anomaly: FieldPersistenceModifier should become
> PersistenceModifier.

+1.=20
It was a hangover from when I originally had ClassPersistenceModifier and=20
=46ieldPersistenceModifier.

> How about creating a new tag like @NotPersistent. To go along with
> @Transactional and @Persistent.

@Transient is already there :-)

The only place that "persistenceModifier" would then be used is in the=20
specification of persistence of embedded objects, or overriding inherited=20
fields - so the user may wish to *not* persistent a particular field. In th=
is=20
case they would have to use @Persistent(persistenceModifier=3DNONE)




Overriding inherited fields :-
One other area if you really want to provide annotations with the full=20
capability that XML has. In XML you can override (inherited) fields=20
persistence specifications in subclasses. With Annotations this currently=20
isn't possible. This could be remedied by changing the specification of=20
@Field/@Property (@Persistent) to be for  ElementType.TYPE too.

=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 06:11 AM

> Overriding inherited fields :-
> One other area if you really want to provide annotations with the full
> capability that XML has. In XML you can override (inherited) fields
> persistence specifications in subclasses. With Annotations this currently
> isn't possible. This could be remedied by changing the specification of
> @Field/@Property (@Persistent) to be for  ElementType.TYPE too.

except that we would need an @Fields (@Persistents ???) to allow an array
or maybe have "fields"/"properties" under @PersistenceCapable

=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Craig L Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 06:11 AM






[ Post a follow-up to this message ]



    Re: DISCUSS remove @Field and @Property; add @Persistent  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-19-07 12:11 PM

> Have I ever told you how much I *hate* using @Transient to describe
> @NotPersistent? Transient is a serialization concept and I have no
> trouble with a field that is both transient and persistent. That is,
> not serialized but stored in the database. So calling something
> @Transient is a big ugly blotch. Because if it's really transient,
> you should mark it in the class as transient.

No. You never told me ;-) nor did anybody else object when those annotation=
s=20
were added a longggg time ago.

So why not @NotPersistent ?

=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:25 AM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register