|
|
@ -15,6 +15,7 @@ import engine.objects.MineProduction; |
|
|
|
import engine.objects.Resource; |
|
|
|
import engine.objects.Resource; |
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.net.UnknownHostException; |
|
|
|
import java.sql.Connection; |
|
|
|
import java.sql.Connection; |
|
|
|
import java.sql.PreparedStatement; |
|
|
|
import java.sql.PreparedStatement; |
|
|
|
import java.sql.ResultSet; |
|
|
|
import java.sql.ResultSet; |
|
|
@ -69,9 +70,11 @@ public class dbMineHandler extends dbHandlerBase { |
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM obj_mine;")) { |
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM obj_mine;")) { |
|
|
|
|
|
|
|
|
|
|
|
ResultSet rs = preparedStatement.executeQuery(); |
|
|
|
ResultSet rs = preparedStatement.executeQuery(); |
|
|
|
mines = getObjectsFromRs(rs, 1000); |
|
|
|
while(rs.next()){ |
|
|
|
|
|
|
|
mines.add(new Mine(rs)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
} catch (SQLException | UnknownHostException e) { |
|
|
|
Logger.error(e); |
|
|
|
Logger.error(e); |
|
|
|
} |
|
|
|
} |
|
|
|
return mines; |
|
|
|
return mines; |
|
|
|