4445464748495051
statement.executeUpdate(); ResultSet result = statement.getGeneratedKeys(); result.next(); resourceType.setResourceTypeID(result.getInt(1)); } catch (SQLException e) { throw new ResourceTypeNameExistsException(); } }
7273747576777879
statement.setString(1, resourceType.getResourceTypeName()); statement.setInt(2, resourceType.getResourceTypeID()); statement.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); throw new ResourceTypeNameExistsException(); } }