ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MCCORMICK, Paul" <Paul.McCORM...@doir.wa.gov.au>
Subject RE: ResultSet ... getTimestamp with Calendar
Date Thu, 11 Jan 2007 07:05:53 GMT

You could use a TypeHandler.  But this would not allow you to easily
change the Calendar object that is used for the query.

E.g.

public class MyTimestampTypeHandler implements TypeHandlerCallback {
   
    private Calendar myCalendar = null;

	public Object getResult(ResultGetter arg0) throws SQLException {
		Timestamp ts = arg0.getTimestamp(myCalendar);

		if (arg0.wasNull())
			return null;
		return ts;
	}

}

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
Of Larry Meadors
Sent: Thursday, 11 January 2007 4:00 PM
To: user-java@ibatis.apache.org
Subject: Re: ResultSet ... getTimestamp with Calendar

Nope, it doesn't.

Larry


On 1/10/07, Cornel Antohi <cantohi@kepler-rominfo.com> wrote:
> Hi,
>
> Any answer to this question ... please?
>
> Thank you,
> Cornel
>
> ----- Original Message -----
> From: "Cornel Antohi" <cantohi@kepler-rominfo.com>
> To: <user-java@ibatis.apache.org>
> Sent: Monday, January 08, 2007 8:26 PM
> Subject: ResultSet ... getTimestamp with Calendar
>
>
> > Hi,
> >
> > I would like to ask you if iBatis offers support for the following
> > JDBC
> > function:
> >
> > http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getT
> > imestamp(int,%20java.util.Calendar)
> >
> > Thank you,
> > Cornel
>
>

"DISCLAIMER: This email, including any attachments, is intended only for use by the addressee(s)
and may contain confidential and/or personal information and may also be the subject of legal
privilege. If you are not the intended recipient, you must not disclose or use the information
contained in it. In this case, please let me know by return email, delete the message permanently
from your system and destroy any copies.

Before you take any action based upon advice and/or information contained in this email you
should carefully consider the advice and information and consider obtaining relevant independent
advice.

Mime
View raw message