Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package io.dropwizard.jdbi.args;
 
 
public class JodaDateTimeMapper extends TypedMapper<DateTime> {
    @Override
    protected DateTime extractByName(final ResultSet rfinal String namethrows SQLException {
        final Timestamp timestamp = r.getTimestamp(name);
        if (timestamp == null) {
            return null;
        }
        return new DateTime(timestamp.getTime());
    }
    @Override
    protected DateTime extractByIndex(final ResultSet rfinal int indexthrows SQLException {
        final Timestamp timestamp = r.getTimestamp(index);
        if (timestamp == null) {
            return null;
        }
        return new DateTime(timestamp.getTime());
    }
New to GrepCode? Check out our FAQ X