/*
(non-Javadoc)
@see org.springframework.transaction.SavepointManager#createSavepoint()
544849
public Object createSavepoint() throws TransactionException {

		SavePoints savePoints = new SavePoints();

		for (TransactionStatus transactionStatus : transactionStatuses.values()) {
			savePoints.save(transactionStatus);
		}
		return savePoints;
	}
292699
public static TransactionEdit createMoveWatermark(long writePointer) {
    return new TransactionEdit(writePointer, 0L, State.MOVE_WATERMARK, 0L, null, 0L, false, null, null, 0L, 0L, null);
  }
543381
protected final PrcPaymentFromSave<RS> createPutPrcPaymentFromSave(
      final Map<String, Object> pAddParam) throws Exception {
    PrcPaymentFromSave<RS> proc = new PrcPaymentFromSave<RS>();
    proc.setSrvAccSettings(getSrvAccSettings());
    proc.setSrvAccEntry(getSrvAccEntry());
    proc.setSrvOrm(getSrvOrm());
    proc.setSrvI18n(getSrvI18n());
    proc.setPrcSalesInvoiceSave(lazyGetPrcSalesInvoiceSave(pAddParam));
    //assigning fully initialized object:
    this.processorsMap.put(PrcPaymentFromSave.class.getSimpleName(), proc);
    return proc;
  }
1371461
public static void disposeSavepoint(
			String pointer,
			StateBackend stateBackend,
			ClassLoader classLoader) throws IOException, FlinkException {

		checkNotNull(pointer, "location");
		checkNotNull(stateBackend, "stateBackend");
		checkNotNull(classLoader, "classLoader");

		final CompletedCheckpointStorageLocation checkpointLocation = stateBackend.resolveCheckpoint(pointer);

		final StreamStateHandle metadataHandle = checkpointLocation.getMetadataHandle();

		// load the savepoint object (the metadata) to have all the state handles that we need
		// to dispose of all state
		final Savepoint savepoint;
		try (InputStream in = metadataHandle.openInputStream();
			DataInputStream dis = new DataInputStream(in)) {

			savepoint = loadCheckpointMetadata(dis, classLoader);
		}

		Exception exception = null;

		// first dispose the savepoint metadata, so that the savepoint is not
		// addressable any more even if the following disposal fails
		try {
			metadataHandle.discardState();
		}
		catch (Exception e) {
			exception = e;
		}

		// now dispose the savepoint data
		try {
			savepoint.dispose();
		}
		catch (Exception e) {
			exception = ExceptionUtils.firstOrSuppressed(e, exception);
		}

		// now dispose the location (directory, table, whatever)
		try {
			checkpointLocation.disposeStorageLocation();
		}
		catch (Exception e) {
			exception = ExceptionUtils.firstOrSuppressed(e, exception);
		}

		// forward exceptions caught in the process
		if (exception != null) {
			ExceptionUtils.rethrowIOException(exception);
		}
	}
1159832
protected final PrcReplicationAccMethodSave<RS>
    createPutPrcReplicationAccMethodSave(
      final Map<String, Object> pAddParam) throws Exception {
    PrcReplicationAccMethodSave<RS> proc =
      new PrcReplicationAccMethodSave<RS>();
    proc.setSrvAccSettings(getSrvAccSettings());
    proc.setSrvOrm(getSrvOrm());
    //assigning fully initialized object:
    this.processorsMap
      .put(PrcReplicationAccMethodSave.class.getSimpleName(), proc);
    return proc;
  }
1143250
public static <T extends Savepoint> void storeCheckpointMetadata(
			T checkpointMetadata,
			OutputStream out) throws IOException {

		DataOutputStream dos = new DataOutputStream(out);
		storeCheckpointMetadata(checkpointMetadata, dos);
	}
895640
protected DaoResult create(Connection conn, T bo) {
        if (bo == null) {
            return null;
        }
        Savepoint savepoint = null;
        try {
            try {
                savepoint = conn.getAutoCommit() ? null : conn.setSavepoint();
                int numRows = execute(conn, calcSqlInsert(bo),
                        rowMapper.valuesForColumns(bo, rowMapper.getInsertColumns()));
                DaoResult result = numRows > 0 ? new DaoResult(DaoOperationStatus.SUCCESSFUL, bo)
                        : new DaoResult(DaoOperationStatus.ERROR);
                if (numRows > 0) {
                    invalidateCache(bo, CacheInvalidationReason.CREATE);
                }
                return result;
            } catch (DuplicatedValueException dke) {
                if (savepoint != null) {
                    conn.rollback(savepoint);
                }
                return new DaoResult(DaoOperationStatus.DUPLICATED_VALUE);
            }
        } catch (SQLException e) {
            throw new DaoException(e);
        }
    }
978207
public function rollbackSavepoint($savepoint)
    {
        if (! $this->getDatabasePlatform()->supportsSavepoints()) {
            throw ConnectionException::savepointsNotSupported();
        }

        $this->getWrappedConnection()->exec($this->platform->rollbackSavePoint($savepoint));
    }
542549
private void save() {

        if ((m_focalPoint != null) && isEditable()) {
            int x = (int)m_focalPoint.getX();
            int y = (int)m_focalPoint.getY();
            String val = "" + x + "," + y;
            CmsUUID sid = m_imageInfoProvider.get().getStructureId();
            List<CmsPropertyModification> propChanges = new ArrayList<>();
            propChanges.add(new CmsPropertyModification(sid, CmsGwtConstants.PROPERTY_IMAGE_FOCALPOINT, val, false));
            final CmsPropertyChangeSet changeSet = new CmsPropertyChangeSet(sid, propChanges);
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().saveProperties(changeSet, this);

                }

                @SuppressWarnings("synthetic-access")
                @Override
                protected void onResponse(Void result) {

                    m_savedFocalPoint = m_focalPoint;

                    if (m_pointWidget != null) {
                        m_pointWidget.setIsDefault(false);
                    }
                    m_imageInfoProvider.get().setFocalPoint(m_focalPoint);
                    if (m_nextAction != null) {
                        m_nextAction.run();
                    }

                }
            };
            action.execute();

        }
    }
57641
@Override
    public synchronized void savepoint(String name) {

        int index = sessionContext.savepoints.getIndex(name);

        if (index != -1) {
            sessionContext.savepoints.remove(name);
            sessionContext.savepointTimestamps.remove(index);
        }

        sessionContext.savepoints.add(name,
                                      ValuePool.getInt(rowActionList.size()));
        sessionContext.savepointTimestamps.addLast(actionTimestamp);

        try {
            database.logger.writeToLog(this, getSavepointSQL(name));
        } catch (HsqlException e) {}
    }
1244582
public static TransactionEdit createAborted(long writePointer, TransactionType type, long[] checkpointPointers) {
    return new TransactionEdit(writePointer, 0L, State.ABORTED, 0L, null, 0L, false, type, null, 0L, 0L,
        checkpointPointers);
  }
1050915
@SuppressWarnings("serial")
    private Button createSaveButton() {

        Button saveBtn = CmsToolBar.createButton(FontOpenCms.SAVE, m_messages.key(Messages.GUI_BUTTON_SAVE_0));
        saveBtn.addClickListener(new ClickListener() {

            public void buttonClick(ClickEvent event) {

                saveAction();
            }

        });
        saveBtn.setEnabled(false);
        return saveBtn;
    }
1256695
protected final void requestCheckpoint(boolean persistent)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "requestCheckpoint",
                        new Object[] { new Boolean(persistent) });

        // During restart checkpointHelper is not running so don't request a checkpoint.
        // A checkpoint is forced at startup once it is safe to do so.
        if (checkpointHelper != null)
            checkpointHelper.requestCheckpoint(persistent);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "requestCheckpoint");
    }
1151339
public Point createPoint(Coordinate coordinate) {
		if (coordinate == null) {
			return new Point(srid, precision);
		}
		return new Point(srid, precision, coordinate.getX(), coordinate.getY());
	}
654588
def create_savepoint(self, savepoint):
        
        if not self._platform.is_savepoints_supported():
            raise DBALConnectionError.savepoints_not_supported()
        self.ensure_connected()
        self._platform.create_savepoint(savepoint)
569683
public Location save(Location o) {
		final String update = "update Location set name = ?, address = ?";
		if (o.getId() != null) {
			// this is an update
			getSimpleJdbcTemplate().update(update, o.getName(), o.getAddress());
		}
		else {
			// this is an insert
			Map<String, Object> args = new HashMap<String, Object>(2);
			args.put("name", o.getName());
			args.put("address", o.getAddress());
			Number id = insertLocation.executeAndReturnKey(args);
			o.setId(id.longValue());
		}
		return o;
	}
145751
void setSavepoint(final String savepointName) {
		if (savepointNames.contains(savepointName)) {
			throw new IllegalStateException();
		}
		savepointNames.add(savepointName);

		if (connection != null) {
			try {
				savepointMap.put(savepointName, connection.setSavepoint(savepointName));
			} catch (SQLException e) {
				throw new UroborosqlSQLException(e);
			}
		}
	}