net.mlw.vlh.adapter.jdbc.util.setter
Class Hibernate20CalendarSetter

java.lang.Object
  extended bynet.mlw.vlh.adapter.jdbc.util.setter.AbstractSetter
      extended bynet.mlw.vlh.adapter.jdbc.util.setter.Hibernate20CalendarSetter
All Implemented Interfaces:
Setter

public class Hibernate20CalendarSetter
extends AbstractSetter

Sets a Calendar using a java.sql.Timestamp on a Query. This could be usefull when you are using hibernate mapping and accesing directly via jdbc.

Version:
$Revision: 1.3 $ $Date: 2005/12/19 10:56:41 $
Author:
Andrej Zachar

Constructor Summary
Hibernate20CalendarSetter()
           
 
Method Summary
 int set(PreparedStatement query, int index, Object value)
           If filter value is instance of the Calendar, it will set it directly to PreparedStatement query.
 
Methods inherited from class net.mlw.vlh.adapter.jdbc.util.setter.AbstractSetter
getReplacementString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hibernate20CalendarSetter

public Hibernate20CalendarSetter()
Method Detail

set

public int set(PreparedStatement query,
               int index,
               Object value)
        throws SQLException,
               ParseException
  1. If filter value is instance of the Calendar, it will set it directly to PreparedStatement query.
  2. Otherwise it will set new Timestamp(with actual time) to query for key.

Parameters:
query - The PreparedStatement.
index - The name of the argument
value - The value to be set
Throws:
ParseException - If an error occurs.
SQLException - If an error occurs.
See Also:
net.mlw.util.sql.StatementBuilder.Setter#set(java.sql.PreparedStatement, int, java.lang.Object)


Copyright © 2003-2006 mlavilson. All Rights Reserved.