Beispiel #1
0
  public static void savePictureData(
      String url,
      String styles,
      String colors,
      String length,
      String brands,
      String salonKey,
      String stylistUsername,
      String userUsername) {

    Picture pic = Picture.read(url);

    pic.styles = Tag.convertStringListToTagList(Arrays.asList(styles.split("\\s*,\\s*")));
    pic.colors = Tag.convertStringListToTagList(Arrays.asList(colors.split("\\s*,\\s*")));
    pic.length = Tag.convertStringListToTagList(Arrays.asList(length.split("\\s*,\\s*")));
    pic.brands = Tag.convertStringListToTagList(Arrays.asList(brands.split("\\s*,\\s*")));

    pic.salon = Salon.read(salonKey);
    pic.stylist = Stylist.readByUsername(stylistUsername);
    pic.user = User.read(userUsername);

    pic.salonKey = salonKey;
    pic.stylistUsername = stylistUsername;
    pic.userUsername = userUsername;

    pic.save();
  }