}
@Override
public Object findById(Number id)
{
Phone phone = null;
Connection connection = null;
try
{
connection = getDataSource().getConnection();
PreparedStatement pstmt = connection.prepareStatement("SELECT * FROM addressbook.person");
ResultSet rs;
if (pstmt.execute())
{
rs = pstmt.getResultSet();
rs.absolute(id.intValue());
phone = new Phone();
phone.setId(rs.getLong("phoneID"));
phone.setPhoneNumber(rs.getString("phoneNumber"));
}
}
catch (SQLException e)
{
e.printStackTrace();