System.out.println(Introspector.decapitalize("P813NAME"));
Gives us --> p813NAME
Mr. Begin wins the gold star. :-)
Here is a nice utility to save you some time next time:
public static void main(String arg[]) throws Exception {
BeanInfo bi = Introspector.getBeanInfo(Account.class);
PropertyDescriptor pd[] = bi.getPropertyDescriptors();
System.out.println("Properties:");
for(int i = 0; i<pd.length; i++){
System.out.println("- " + pd[i].getName());
}
}
Change the Account.class to your class, and try it out.
Larry
On 7/2/05, Clinton Begin <[EMAIL PROTECTED]> wrote:
> whoops,
>
> It's probably actually p813NAME unfortunately...
>
> Clinton
>
>
> On 7/2/05, Clinton Begin <[EMAIL PROTECTED]> wrote:
> >
> > I believe the name does comply.However, I'm wondering what the JavaBeans
> spec says about numbers in the first two characters in the name. See the
> JavaBeans spec is such that property names are resolved as follows:
> >
> > setUrl == url
> > setURL == URL
> > setUrL == urL
> > setURl == URL
> >
> > But I'm not sure what happens when the first two characters are obscured
> by a number. Which should it be:
> >
> > P813NAME
> > -or-
> > p813name
> >
> > Chances are, whichever you're trying, it's probably the other one. My
> guess is for the latter: p813name
> >
> > We might have to look in the JavaBeans specification for this one.
> >
> > Cheers,
> > Clinton
> >
> >
> >
> >
> > On 7/1/05, Ashish Kulkarni <[EMAIL PROTECTED] > wrote:
> > > Hello
> > > I think the problem is because code in my bean is as
> > > below
> > > private java.lang.String P813NAME ;
> > > public void setP813NAME (java.lang.String P813NAME )
> > > {
> > > this.P813NAME = P813NAME;
> > > }
> > > public java.lang.String getP813NAME ()
> > > {
> > > return this.P813NAME ;
> > > }
> > >
> > > does this comply to java bean standards
> > >
> > > Ashish
> > >
> > >
> > >
> > > --- Ashish Kulkarni < [EMAIL PROTECTED] >
> > > wrote:
> > >
> > > > Hi
> > > > I am trying to use SQL Map to insert data into
> > > > database,
> > > > this table has 124 columns, and i have defined a
> > > > java
> > > > bean to map with this database,
> > > > I am sure that the database bean and insert statment
> > > > in xml file is correct,
> > > > but still i get this error, is there a way to debug
> > > > and find what is going wrong,
> > > > is there a limitation to number of columns to be
> > > > inserted in table.
> > > > How do i debug this problem
> > > >
> > > >
> > > > Ashish
> > > >
> > > >
> > > >
> > > > ____________________________________________________
> > > >
> > > > Yahoo! Sports
> > > > Rekindle the Rivalries. Sign up for Fantasy Football
> > > >
> > > > http://football.fantasysports.yahoo.com
> > > >
> > >
> > >
> > > A$HI$H
> > >
> > >
> > >
> > > ____________________________________________________
> > > Yahoo! Sports
> > > Rekindle the Rivalries. Sign up for Fantasy Football
> > > http://football.fantasysports.yahoo.com
> > >
> >
> >
>
>