Examples of Painting


Examples of org.apache.cayenne.testdo.testmap.Painting

        queryInterceptor.runWithQueriesBlocked(new UnitTestClosure() {

            public void execute() {
                assertFalse(result.isEmpty());
                Painting p1 = result.get(0);

                Object toOnePrefetch = p1.readNestedProperty("toArtist");
                assertNotNull(toOnePrefetch);
                assertTrue(
                        "Expected Artist, got: " + toOnePrefetch.getClass().getName(),
                        toOnePrefetch instanceof Artist);
View Full Code Here

Examples of org.apache.cayenne.tutorial.persistent.Painting

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

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

        Painting stein = context.newObject(Painting.class);
        stein.setName("Gertrude Stein");

        // connecting objects together via relationships
        picasso.addToPaintings(girl);
        picasso.addToPaintings(stein);

        girl.setGallery(metropolitan);
        stein.setGallery(metropolitan);

        // saving all the changes above
        context.commitChanges();
    }
View Full Code Here

Examples of org.bukkit.entity.Painting

    public static BukkitEntity toLocalEntity(Entity e) {
        switch (e.getType()) {
            case EXPERIENCE_ORB:
                return new BukkitExpOrb(toLocation(e.getLocation()), e.getUniqueId(), ((ExperienceOrb)e).getExperience());
            case PAINTING:
                Painting paint = (Painting) e;
                return new BukkitPainting(toLocation(e.getLocation()), paint.getArt(), paint.getFacing(), e.getUniqueId());
            case DROPPED_ITEM:
                return new BukkitItem(toLocation(e.getLocation()), ((Item)e).getItemStack(), e.getUniqueId());
            default:
                return new BukkitEntity(toLocation(e.getLocation()), e.getType(), e.getUniqueId());
        }
View Full Code Here

Examples of org.bukkit.entity.Painting

        return true;
    }

    public boolean spawnRaw(Location weLoc) {
        org.bukkit.Location loc = BukkitUtil.toLocation(weLoc);
        Painting paint = loc.getWorld().spawn(loc, Painting.class);
        if (paint != null) {
            paint.setFacingDirection(facingDirection, true);
            paint.setArt(art, true);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of org.spout.vanilla.component.entity.substance.Painting

      }
    }
    PaintingType paintingType = list.get(GenericMath.getRandom().nextInt(list.size() - 1));

    Entity e = world.createEntity(paintingType.getCenter(against, block.getPosition()), Painting.class);
    Painting painting = e.add(Painting.class);
    painting.setType(paintingType);
    painting.setFace(against);
    world.spawnEntity(e);
  }
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.