17 lines
559 B
Java
17 lines
559 B
Java
package com.utopiaindustries.dao.ctp;
|
|
|
|
import com.utopiaindustries.model.ctp.Authority;
|
|
import org.springframework.jdbc.core.RowMapper;
|
|
|
|
import java.sql.ResultSet;
|
|
import java.sql.SQLException;
|
|
|
|
public class AuthorityRowMapper implements RowMapper<Authority> {
|
|
public Authority mapRow(ResultSet rs, int rowNum ) throws SQLException {
|
|
Authority userAuthority = new Authority();
|
|
userAuthority.setUsername( rs.getString( "username" ) );
|
|
userAuthority.setAuthority( rs.getString( "authority" ) );
|
|
return userAuthority;
|
|
}
|
|
}
|