Package org.xrace.model

Examples of org.xrace.model.Image


  public BlobImage(long id, ImageService imageService)
  {
    super();
    this.id = id;
    this.imageService = imageService;
    Image img = imageService.find(id);
    setFormat(img.getType());

  }
View Full Code Here


  }

  @Override
  protected Blob getBlob()
  {
    Image img = imageService.find(id);
    return img.getImageBlob();
  }
View Full Code Here

    fs.read(imageData, 0, (int) fs.length());

    fs.close();

    final Image img = new Image();
    img.setType("jpb");
    img.setData(imageData);

    this.getImageService().save(img);

    setComplete();
    endTransaction();
View Full Code Here

  }

  private void createTestChoixArticle()
  {

    Image img;

    img = this.getImageService().getImageById(1);
    Choix choix;
    choix = new Choix();
    choix.setDescription(("Brosen_city_bicycle"));
View Full Code Here

  }

  private void createTestImages() throws FileNotFoundException, IOException
  {

    final Image img1 = new Image();
    img1.setType("jpb");
    img1.setData(readImage(".\\src\\test\\resources\\200px-Brosen_city_bicycle.jpg"));

    this.getImageService().save(img1);

    final Image img2 = new Image();
    img2.setType("jpb");
    img2.setData(readImage(".\\src\\test\\resources\\Draisine.jpg"));

    this.getImageService().save(img2);

    final Image img3 = new Image();
    img3.setType("jpb");
    img3.setData(readImage(".\\src\\test\\resources\\Honda_mountain_bike.jpg"));

    this.getImageService().save(img3);

    final Image img4 = new Image();
    img4.setType("jpb");
    img4.setData(readImage(".\\src\\test\\resources\\RacingBicycle.jpg"));

    this.getImageService().save(img4);

    final Image img5 = new Image();
    img5.setType("jpb");
    img5.setData(readImage(".\\src\\test\\resources\\Tandem-bike.jpg"));

    this.getImageService().save(img5);

  }
View Full Code Here

    GregorianCalendar calendar2 = new java.util.GregorianCalendar();
    calendar2.set(2009, 12, 31);
    calendar2.getTime();

    Image img;
    Publicite p;

    img = new Image();
    img.setType("jpb");
    img.setData(readImage(".\\src\\test\\resources\\480x60.jpg"));

    this.getImageService().save(img);

    p = new Publicite();
    p.setDescription("Demo 480x60");
View Full Code Here

        final FileUpload upload = fileUploadField.getFileUpload();

        if (upload != null)
        {

          Image img = new Image();
          img.setData(upload.getBytes());
          img.setType(upload.getContentType());

          imageService.save(img);
          publicite.setImage(img);

        }
View Full Code Here

        final FileUpload upload = fileUploadField.getFileUpload();

        if (upload != null)
        {

          Image img = new Image();
          img.setData(upload.getBytes());
          img.setType(upload.getContentType());

          imageService.save(img);
          choix.setImage(img);
        }
View Full Code Here

TOP

Related Classes of org.xrace.model.Image

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.