001    package railo.runtime.query.caster;
002    
003    import java.io.IOException;
004    import java.sql.ResultSet;
005    import java.sql.SQLException;
006    import java.sql.Time;
007    
008    import railo.runtime.type.dt.DateTimeImpl;
009    
010    public class TimeCast implements Cast{
011    
012            /**
013             * @see railo.runtime.query.caster.Cast#toCFType(int, java.sql.ResultSet, int)
014             */
015            public Object toCFType(int type, ResultSet rst, int columnIndex) throws SQLException, IOException {
016                    Time t = rst.getTime(columnIndex);
017                    if(t==null) return null;
018                    
019                    return new DateTimeImpl(t.getTime(),false);
020                    
021            }
022    
023    }