package com.utopiaindustries.dao.uind;

import com.utopiaindustries.model.uind.LocationSite;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class LocationSiteRowMapper implements RowMapper<LocationSite> {
    public LocationSite mapRow(ResultSet rs, int rowNum ) throws SQLException {
        LocationSite locationSite = new LocationSite();
        locationSite.setId( rs.getLong( "id" ) );
        locationSite.setTitle( rs.getString( "title" ) );
        locationSite.setShortTitle( rs.getString( "short_title" ) );
        locationSite.setAddress( rs.getString( "address" ) );
        locationSite.setHasColony( rs.getBoolean("has_colony") );
        return locationSite;
    }
}