private void setPreparedStatementValues(PreparedStatement preparedStatement, 
											Field field, 
											int index,
											Product product) {
		
		try {
			Class<?> type = field.getType();
			String typeName = type.getSimpleName();
			
			if (typeName.equals("String")) {
				preparedStatement.setString(index, field.get(product).toString());
			} else if (typeName.equals("Color")) {
				preparedStatement.setInt(index, ((Color)field.get(product)).getRGB());
			} else if (typeName.equals("int")) {
				preparedStatement.setInt(index, (Integer) field.get(product));
			} else if (typeName.equals("double")) {
				preparedStatement.setDouble(index, (Double) field.get(product));
			} else if (typeName.equals("Date")) {
				Date date = (Date)field.get(product);
				
				preparedStatement.setString(index, getDateString(date));
			}
		} catch (Exception e) {
			System.err.println("Error preparing statement.");
			e.printStackTrace();
		}
	}