Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.skife.jdbi.v2;
 
Result set mapper factory which knows how to construct java primitive types.
    private static final Map<ClassResultSetMappermappers = new HashMap<ClassResultSetMapper>();
    static {
        .put(BigDecimal.class.);
        .put(Boolean.class.);
        .put(boolean.class.);
        .put(byte[].class.);
        .put(short.class.);
        .put(Short.class.);
        .put(Float.class.);
        .put(float.class.);
        .put(Double.class.);
        .put(double.class.);
        .put(Byte.class.);
        .put(byte.class.);
        .put(URL.class.);
        .put(int.class.);
        .put(Integer.class.);
        .put(long.class.);
        .put(Long.class.);
        .put(Timestamp.class.);
        .put(String.class.);
    }
    public boolean accepts(Class typeStatementContext ctx)
    {
        return .containsKey(type);
    }
    public ResultSetMapper mapperFor(Class typeStatementContext ctx)
    {
        return .get(type);
    }
New to GrepCode? Check out our FAQ X