> The CodeGenerator tool generates private setters/getters.
> Is there a way to force it to generate public setters/
> getters?
Grap the latest cvs version or modify BasicRenderer.
---
This SF.NET email is sponsored by: FREE SSL Guide from Th
The CodeGenerator tool generates private setters/getters. Is there a way
to force it to generate public setters/getters?
Gordon
---
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click
TECTED] cc:
eforge.net Subject: Re: RE:
[Hibernate] CodeGenerat
> I agree 100%, and I'm puzzled by this.
> I posted about that in the Forum on SF,
> asking the same questions.
Ok... it's strange... Hibernate uses several metatags to do this.
Defaults SUCK big time if you ask me. And it also uses the same function
for both (getFieldScope). I attached fixed Basi
I agree 100%, and I'm puzzled by this.
I posted about that in the Forum on SF,
asking the same questions.
Cf.
http://sourceforge.net/forum/forum.php?thread_id=802051&forum_id=128638
No answers yetam I missing something here?
Thanks,
Otis
On Thu, 30 Jan 2003, Aapo Laakkonen
([EMAIL P
Ok, I see that the BasicRenderer seems to want some parameter and it
defaults to private, which is insane, I think (should default to
public).
---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something
Why does CodeGenerator in Hibernate2 generate "private" getters and
setters?
---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_
Thursday, January 09, 2003 11:27 PM
Subject: [Hibernate] Codegenerator of the future?
> Will the Codegenerator of the future
> (http://hibernate.bluemars.net/52.html#17) replace the current
> ReverseGenerator? What I mean is that I have used the ReverseGenerator to
> create a Tabl
Will the Codegenerator of the future
(http://hibernate.bluemars.net/52.html#17) replace the current
ReverseGenerator? What I mean is that I have used the ReverseGenerator to
create a TableName.java class and it's accompanying TableName.hbm.xml. This
works great and I applaud you all on making thi
> Its it the actual field, the getX() or the setX() that should
> be modified ? (The same actually goes for the "description" tag...)
I meant the get/set pair. Fields should always be private.
perhaps it makes more sense to have getter-scope and
setter-scope.
> How about having "description-get
> >
> >
> > JavaDoc comment for getBar()
> >
> > java.lang.Object
> >
> > .
>
> But this one ? Isn't this a bit "cloudy"
> If I understand this correctly you want that if "java-type"
> is provided the codegenerator should use that type instead of
> the t
> >
> >
> > JavaDoc comment for getBar()
> >
> > java.lang.Object
> >
> > .
>
> But this one ? Isn't this a bit "cloudy"
> If I understand this correctly you want that if "java-type"
> is provided the codegenerator should use that type instead of
> t
> > Thus, I'll suggest (and also make a patch as I get to it) that it
> > should be optional to have the dependency on commons-lang.
> Optimal, we
> > could generate a bare-boned toString method based on the
> > attributes/properties know to the metadata.
> >
>
> On second thought - I'll add an opt
> > >The generated classes now have a dependency upon
> commons-lang, which
> > >doesn't bother me in the slightest, but other people may
> have another
> > >opinion.
> >
> > Yes - me for one :) I would like to keep the generated code
> as simple
> > as possible :) (but at the same time I li
gt; From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Gavin King
> > Sent: Sunday, December 29, 2002 4:09 AM
> > To: [EMAIL PROTECTED]
> > Subject: [Hibernate] CodeGenerator
> >
> >
> >
> > Hi everyone,
> >
> > I sp
equals() and hashCode() can be implemented using this definition :
for all persistent objects a, b :
a.equals(a) === true
a.equals(b) ==> b.equals(a)
a.equals(b) ==> a.hashCode() = b.hashCode()
a is persistent ==> a.getId() != null
a.equals(b)
> >The generated classes now have a dependency upon
> >commons-lang, which doesn't bother me in the
> >slightest, but other people may have another
> >opinion.
>
> Yes - me for one :) I would like to keep the generated code
> as simple as possible :) (but at the same time I like to broaden
> the u
guidelines written here:
(which is what commons-lang has done)
http://java.sun.com/docs/books/effective/chapters.html (Read Chapter 3)
/max
- Original Message -
From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 29, 2002 4:47 PM
S
>
> This is more or less what commons-lang's reflectionToString
> does (which is what Gavin's patch will make the CodeGenerator do now)
>
> But what about your hashCode ?
>
> /max
>
I'm looking for advice on how to implement an equals() and hashCode()
method in my base class. Any suggestion
> Is it recommended that all hibernate persistent classes implement
> equals() and hashcode()?
It is always recommende to implement equals and hashCode for any class
that you would consider putting into java collections or other mechanisms
that tries to identity and/or sort themso yes, it is
att
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Gavin King
> Sent: Sunday, December 29, 2002 4:09 AM
> To: [EMAIL PROTECTED]
> Subject: [Hibernate] CodeGenerator
>
>
>
> Hi everyone,
>
> I spent some t
>The generated classes now have a dependency upon
>commons-lang, which doesn't bother me in the
>slightest, but other people may have another
>opinion.
Yes - me for one :) I would like to keep the generated code
as simple as possible :) (but at the same time I like to broaden
the usage of commons
> Yeah that would make more sense. Do you wanna produce a patch? (Do we
> need to worry about backward compatibility on this?)
Maybe I could look this after I get some sleep, :-). Quick search to
source code gave me an idea. The feature I'm after can easily be patched
at the bottom of Basic Rende
konen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 12:54 AM
Subject: [Hibernate] CodeGenerator
> Is it possible to modify CodeGenerator tool so that when I have property
> type set to "true_false" or "yes_no" and name set to &qu
Is it possible to modify CodeGenerator tool so that when I have property
type set to "true_false" or "yes_no" and name set to "something" eg.:
to generate something like this:
public boolean isSomething() {
return this.something;
}
public void setSomething(boolean something
Thanks Max :)
- Original Message -
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: "Gavin King" <[EMAIL PROTECTED]>
Sent: Sunday, November 03, 2002 1:13 AM
Subject: Re: [Hibernate] CodeGenerator bug
> > > The codegenerator assumes
> The codegenerator assumes there are at least ONE attribute on each
> persistent class, and in this case it sees none
> because of the above mentioned "error".
Theoretically Hibernate can persist a class with no properties ...
CodeGenerator should handle the *possibility* at least.
> I can easi
d (except if we add a
new feature to the codegenerator to
insert af default java type for properties without a type?)
/max
- Original Message -
From: "Gavin King" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 6:37 PM
Subject: [Hiberna
Yes - it was the problem about creation of the minimal constructor in the
codegen.
Which hbm.xml are you running it on ?
/max
- Original Message -
From: "Gavin King" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 6:37 PM
Subject: [Hi
29 matches
Mail list logo