public class DatabaseAccess<XXX> {
private static final String URL = "XXXXXXXXXXXXXXX",
USER = "postgres", PASSWORD = "XXX";
static PreparedStatement pstmt= null;
ResultSet rs= null;
// Methode für Datenbankverbindung
public static Connection getConnection() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
{
Class.forName("org.postgresql.Driver").newInstance();
Connection conn= DriverManager.getConnection(URL, USER, PASSWORD);
return conn;
}
}
public void saveAusgaben(List<Auto> eingabeList) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
Iterator<[Typ]> iterator= eingabeList.iterator();
while(iterator.hasNext()){
Auto a= iterator.next();