geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Voutat" <olivier.vou...@gmail.com>
Subject Re: FindByPrimaryKey
Date Thu, 06 Apr 2006 13:01:06 GMT
That's perfect, I appreciate very much your help my friends.

I'm sorry Gianny, the fact is that I didn't understand your first mail about
this subject because I didn't know the Timestamp class yet. Always used
Calendar and Date (even if this last one is almost completely deprecated.

Best Regards,
Olivier Voutat

On 4/6/06, David Carew <dccarew@gmail.com> wrote:
>
> The java.sql.Timestamp class has a static method  called valueOf to
> convert Strings in the format yyyy-mm-dd hh:mm:ss.fffffffff  (where
> ffffffffff represents nanoseconds) to a java.sql.Timestamp instance.  As
> pointed out previously, this is easier than writing your own converter.  See
> Javadocs for java.sql.Timestamp for more info.
>
> In your  Entity Bean class you would declare the field like the following:
>
>
> public abstract java.sql.Timestamp getstartDate();
>
> public abstract void setStartDate(java.sql.Timestamp newStartDate);
>
> And then you can use Timestamp.valueOf(String yourStartDateAsString) to
> convert as appropriate.
>
>
>
>
>


--
Olivier Jeanpierre Voutat
Rua Praia de Muriú, 9188
Cep 59092-390 / Natal - RN
Tel: (84) 3219-0427 Cel: (84) 9977-3917

Mime
View raw message