Examples of Cascade


Examples of org.hibernate.engine.internal.Cascade

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to collections BEFORE the collection owner is deleted
      new Cascade( CascadingActions.DELETE, CascadePoint.AFTER_INSERT_BEFORE_DELETE, session ).cascade(
          persister,
          entity,
          transientEntities
      );
    }
View Full Code Here

Examples of org.hibernate.engine.internal.Cascade

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to many-to-one AFTER the parent was deleted
      new Cascade( CascadingActions.DELETE, CascadePoint.BEFORE_INSERT_AFTER_DELETE, session ).cascade(
          persister,
          entity,
          transientEntities
      );
    }
View Full Code Here

Examples of org.hibernate.engine.internal.Cascade

    // rather because it might now be stale, and there is no longer any
    // EntityEntry to take precedence
    // This is now handled by removeEntity()
    //session.getPersistenceContext().removeDatabaseSnapshot(key);

    new Cascade( CascadingActions.EVICT, CascadePoint.AFTER_EVICT, session ).cascade( persister, object );
  }
View Full Code Here

Examples of org.hibernate.engine.internal.Cascade

   */
  private void cascadeOnUpdate(SaveOrUpdateEvent event, EntityPersister persister, Object entity) {
    final EventSource source = event.getSession();
    source.getPersistenceContext().incrementCascadeLevel();
    try {
      new Cascade( CascadingActions.SAVE_UPDATE, CascadePoint.AFTER_UPDATE, source ).cascade( persister, entity );
    }
    finally {
      source.getPersistenceContext().decrementCascadeLevel();
    }
  }
View Full Code Here

Examples of org.openstreetmap.josm.gui.mappaint.Cascade

         }
     }

    @Override
    public void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed) {
        Cascade def = mc.getOrCreateCascade("default");
        boolean useMinMaxScale = Main.pref.getBoolean("mappaint.zoomLevelDisplay", false);

        if (osm instanceof Node || (osm instanceof Relation && "restriction".equals(osm.get("type")))) {
            IconPrototype icon = getNode(osm, (useMinMaxScale ? scale : null), mc);
            if (icon != null) {
                def.put(ICON_IMAGE, icon.icon);
                if (osm instanceof Node) {
                    if (icon.annotate != null) {
                        if (icon.annotate) {
                            def.put(TEXT, Keyword.AUTO);
                        } else {
                            def.remove(TEXT);
                        }
                    }
                }
            }
        } else if (osm instanceof Way || (osm instanceof Relation && ((Relation)osm).isMultipolygon())) {
            WayPrototypesRecord p = new WayPrototypesRecord();
            get(osm, pretendWayIsClosed || !(osm instanceof Way) || ((Way) osm).isClosed(), p, (useMinMaxScale ? scale : null), mc);
            if (p.line != null) {
                def.put(WIDTH, new Float(p.line.getWidth()));
                def.putOrClear(REAL_WIDTH, p.line.realWidth != null ? new Float(p.line.realWidth) : null);
                def.putOrClear(COLOR, p.line.color);
                if (p.line.color != null) {
                    int alpha = p.line.color.getAlpha();
                    if (alpha != 255) {
                        def.put(OPACITY, Utils.color_int2float(alpha));
                    }
                }
                def.putOrClear(DASHES, p.line.getDashed());
                def.putOrClear(DASHES_BACKGROUND_COLOR, p.line.dashedColor);
            }
            Float refWidth = def.get(WIDTH, null, Float.class);
            if (refWidth != null && p.linemods != null) {
                int numOver = 0, numUnder = 0;

                while (mc.hasLayer(String.format("over_%d", ++numOver)));
                while (mc.hasLayer(String.format("under_%d", ++numUnder)));

                for (LinemodPrototype mod : p.linemods) {
                    Cascade c;
                    if (mod.over) {
                        String layer = String.format("over_%d", numOver);
                        c = mc.getOrCreateCascade(layer);
                        c.put(OBJECT_Z_INDEX, new Float(numOver));
                        ++numOver;
                    } else {
                        String layer = String.format("under_%d", numUnder);
                        c = mc.getOrCreateCascade(layer);
                        c.put(OBJECT_Z_INDEX, new Float(-numUnder));
                        ++numUnder;
                    }
                    c.put(WIDTH, new Float(mod.getWidth(refWidth)));
                    c.putOrClear(COLOR, mod.color);
                    if (mod.color != null) {
                        int alpha = mod.color.getAlpha();
                        if (alpha != 255) {
                            c.put(OPACITY, Utils.color_int2float(alpha));
                        }
                    }
                    c.putOrClear(DASHES, mod.getDashed());
                    c.putOrClear(DASHES_BACKGROUND_COLOR, mod.dashedColor);
                }
            }
            if (multipolyOuterWay != null) {
                WayPrototypesRecord p2 = new WayPrototypesRecord();
                get(multipolyOuterWay, true, p2, (useMinMaxScale ? scale : null), mc);
View Full Code Here

Examples of water.api.CascadeHandler.Cascade

  // Output
  @API(help="A Key is returned from the execution of the R expression.")
  Key key;

  @Override public Cascade createImpl() {
    Cascade c = new Cascade();

    // TODO: R-like expressions unsupported for now
    if (!expr.equals("")) throw H2O.unimpl();

    if (ast.equals("")) throw H2O.fail("No ast supplied! Nothing to do.");
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.