Examples of Gallery


Examples of er.cayenne.example.persistent.Gallery

    picasso = objContext.newObject(Artist.class);
    picasso.setName("Pablo Picasso");
    picasso.setDateOfBirthString("18811025");

    // Creating other objects
    Gallery metropolitan = objContext.newObject(Gallery.class);
    metropolitan.setName("Metropolitan Museum of Art");

    Painting girl = objContext.newObject(Painting.class);
    girl.setName("Girl Reading at a Table");

    Painting stein = objContext.newObject(Painting.class);
View Full Code Here

Examples of it.hotel.model.gallery.Gallery

  protected Map referenceData (HttpServletRequest req) throws Exception{
    Map map = new HashMap ();
    User user = userContainer.getUser();
    int hotelId = user.getStructureId();
    Structure hotel = (Structure) structureManager.get(hotelId);
        Gallery gallery = (Gallery) galleryManager.get(hotel.getGallery().getId());
    Set<Photo> photos = gallery.getPhotos();
    map.put("hotel", hotel);
    map.put("photos", photos);
    return map;
  }
View Full Code Here

Examples of it.hotel.model.gallery.Gallery

    Image imageUrl      = null;
    int height         = -1;
    int width         = -1;
    int heightUrl       = -1;
    int widthUrl      = -1;
    Gallery gallery     = null;
    String namePhoto     = null;
    String baseUrlPhoto    = null;
   
    Photo photo = (Photo) command;
 
View Full Code Here

Examples of it.hotel.model.gallery.Gallery

      else{
        photo.setLocale(oldLocale);
      }
      localeContainer.setLocale(oldLocale);
      ModelAndView mav = new ModelAndView("hotel.photo.new");;
      Gallery gallery = (Gallery)galleryManager.get(photo.getGallery().getId());
      mav.addObject("photo", photo);
      mav.addObject("photos", gallery.getPhotos());
      return mav;
    }
    return new ModelAndView("redirect:/photo/new.htm");   
  }
View Full Code Here

Examples of it.hotel.model.gallery.Gallery

 
 
    public void setUpPhoto() {
   
    photo = new Photo();
    Gallery gallery = new Gallery ();
    photo.setGallery(gallery);
   
   
  }
View Full Code Here

Examples of it.hotel.model.gallery.Gallery

 
 
 
    public void setUpGallery() {
   
       gallery = new Gallery();
   
   
  }
View Full Code Here

Examples of org.apache.art.Gallery

        p.setPaintingTitle("P1");

        Artist a = context.newObject(Artist.class);
        a.setArtistName("A1");

        Gallery g = context.newObject(Gallery.class);
        g.setGalleryName("G1");

        p.setToArtist(a);
        p.setToGallery(g);
        context.commitChanges();
View Full Code Here

Examples of org.apache.art.Gallery

        BeanValidationFailure failure = (BeanValidationFailure) failures.get(0);
        assertEquals(Exhibit.TO_GALLERY_PROPERTY, failure.getProperty());

        // fix the problem and see if it goes away
        Gallery gallery = context.newObject(Gallery.class);
        exhibit.setToGallery(gallery);
        result = new ValidationResult();
        exhibit.validateForSave(result);
        assertFalse("No failures expected: " + result, result.hasFailures());
    }
View Full Code Here

Examples of org.apache.art.Gallery

                assertTrue(expectedPaintingsNames.contains(p.getPaintingTitle()));
            }
            String artistName = (String) firstRow[1];
            assertEquals("A1", artistName);

            Gallery g1 = (Gallery) firstRow[2];
            assertEquals("gallery1", g1.getGalleryName());

            List exibits = g1.getExhibitArray();

            assertNotNull(exibits);
            assertFalse(((ValueHolder) exibits).isFault());
            assertEquals(2, exibits.size());

            Object[] secondRow = (Object[]) objects.get(1);
            a = (Artist) secondRow[0];
            assertEquals("A2", a.getArtistName());

            paintings = a.getPaintingArray();

            assertNotNull(paintings);
            assertFalse(((ValueHolder) paintings).isFault());
            assertEquals(1, paintings.size());

            expectedPaintingsNames = new ArrayList<String>();
            expectedPaintingsNames.add("P2");

            paintingsIterator = paintings.iterator();
            while (paintingsIterator.hasNext()) {
                Painting p = paintingsIterator.next();
                assertEquals(PersistenceState.COMMITTED, p.getPersistenceState());
                assertNotNull(p.getPaintingTitle());
                assertTrue(expectedPaintingsNames.contains(p.getPaintingTitle()));
            }
            artistName = (String) secondRow[1];
            assertEquals("A2", artistName);

            Gallery g2 = (Gallery) secondRow[2];
            assertEquals(g1, g2);
        }
        finally {
            unblockQueries();
        }
View Full Code Here

Examples of org.apache.art.Gallery

                assertTrue(expectedPaintingsNames.contains(p.getPaintingTitle()));
            }
            String artistName1 = (String) row[1];
            assertEquals("A1", artistName1);

            Gallery g1 = (Gallery) row[2];
            assertEquals("gallery1", g1.getGalleryName());

            List exibits = g1.getExhibitArray();

            assertNotNull(exibits);
            assertFalse(((ValueHolder) exibits).isFault());
            assertEquals(2, exibits.size());

            row = (Object[]) objects.get(1);

            assertEquals(a1, (Artist) row[0]);
            assertEquals(artistName1, row[1]);

            Gallery g2 = (Gallery) row[2];
            assertEquals("gallery2", g2.getGalleryName());

            exibits = g2.getExhibitArray();

            assertTrue(exibits.isEmpty());

            row = (Object[]) objects.get(2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.