Code example for ResultSet

Methods: getObject

0
		String columnName = f.getName();
		Column column = f.getAnnotation(Column.class);
		if(null != column && column.name() != null)
			columnName = column.name();
		 
		return rs.getObject(columnName);
	} 
	 
	@SneakyThrows 
	protected Object grabField(String fName, ResultSet rs)
	{ 
		Field f = clazz.getDeclaredField(fName);
		String columnName = f.getName();
		Column column = f.getAnnotation(Column.class);
		if(null != column && column.name() != null)
			columnName = column.name();
		 
		return rs.getObject(columnName);
	}