Updates all modifiable fields from another case definition entity.
@param updatingCaseDefinition
551670
@Override
  public void updateModifiableFieldsFromEntity(CaseDefinitionEntity updatingCaseDefinition) {
    if (this.key.equals(updatingCaseDefinition.key) && this.deploymentId.equals(updatingCaseDefinition.deploymentId)) {
      this.revision = updatingCaseDefinition.revision;
      this.historyTimeToLive = updatingCaseDefinition.historyTimeToLive;
    }
    else {
      LOG.logUpdateUnrelatedCaseDefinitionEntity(this.key, updatingCaseDefinition.key, this.deploymentId, updatingCaseDefinition.deploymentId);
    }
  }
608005
public void setModified(boolean[] rgbModified)
    {
        int iFieldCount = this.getFieldCount();  // BaseField Count
        for (int iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq < iFieldCount + DBConstants.MAIN_FIELD; iFieldSeq++)
        {
            BaseField field = this.getField(iFieldSeq);
            if (iFieldSeq < rgbModified.length)
                field.setModified(rgbModified[iFieldSeq]);
        }
    }
763256
public UpdateServiceActionRequest withDefinition(java.util.Map<String, String> definition) {
        setDefinition(definition);
        return this;
    }
1049422
private void updateIgnoredWordDictionary() {
    wordsToBeIgnoredDictionary = wordsToBeIgnored
                                   .stream()
                                   .collect(Collectors.groupingBy(s -> s.substring(0,1), Collectors.toSet()));
    wordsToBeIgnoredDictionaryIgnoreCase = wordsToBeIgnored
                                             .stream()
                                             .map(String::toLowerCase)
                                             .collect(Collectors.groupingBy(s -> s.substring(0,1), Collectors.toSet()));
  }
821194
protected void updateCaseFileItems(AuditCaseInstanceData auditCaseInstanceData, EntityManager em) {
        
        if (auditCaseInstanceData.getCaseFileData() == null || auditCaseInstanceData.getCaseFileData().isEmpty()) {
            return;
        }

        List<String> currentCaseData = currentCaseData(auditCaseInstanceData.getCaseId(), em);
        auditCaseInstanceData.getCaseFileData().forEach((item) -> {
                        
            CaseFileDataLog caseFileDataLog = null;
            if (currentCaseData.contains(item.getItemName())) {
                logger.debug("Case instance {} has already stored log value for {} thus it's going to be updated", auditCaseInstanceData.getCaseId(), item.getItemName());
                caseFileDataLog = caseFileDataByName(auditCaseInstanceData.getCaseId(), item.getItemName(), em);
            
                caseFileDataLog.setItemType(item.getItemType());
                caseFileDataLog.setItemValue(item.getItemValue());
                caseFileDataLog.setLastModified(item.getLastModified());
                caseFileDataLog.setLastModifiedBy(item.getLastModifiedBy());
                em.merge(caseFileDataLog);
            } else {
                logger.debug("Case instance {} has no log value for {} thus it's going to be inserted", auditCaseInstanceData.getCaseId(), item.getItemName());                
                em.persist(item);
            }   
            
        }
1274509
public void setRefid(String v) {
    if (EventArgument_Type.featOkTst && ((EventArgument_Type)jcasType).casFeat_refid == null)
      jcasType.jcas.throwFeatMissing("refid", "de.julielab.jules.types.ace.EventArgument");
    jcasType.ll_cas.ll_setStringValue(addr, ((EventArgument_Type)jcasType).casFeatCode_refid, v);}
250561
public static <T> void forceUpdateAllProperties(BeanDescriptor<T> beanDescriptor, T model) {
        EntityBeanIntercept intercept = ((EntityBean) model)._ebean_getIntercept();
        intercept.setLoaded();
        int idIndex = beanDescriptor.getIdProperty().getPropertyIndex();
        for (int i = 0; i < intercept.getPropertyLength(); i++) {
            if (i != idIndex) {
                intercept.markPropertyAsChanged(i);
                intercept.setLoadedProperty(i);
            }
        }
    }
854877
public void updateValue()
    {
        try
        {
            Method method = m_propertyMetadata.getSetMethod();
            //Object convertedValue = ValidationUtils.convertTo(getClazz(), m_currentValue);
            if (m_currentValue == null && method.getParameterTypes()[0].isPrimitive())
            {
                method.invoke(m_proxyObject.getObject(), ConvertUtils.getPrimitiveTypeForNull(method.getParameterTypes()[0]));
            }
            else
            {
                method.invoke(m_proxyObject.getObject(), m_currentValue);
            }
            m_useCurrentValue = false;
            m_notKnown = false;
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
65389
protected void logEntityModification(EntityIdValue entityId,
			List<Statement> updateStatements, String propertyId) {
		modifiedEntities++;
		modifiedStatements += updateStatements.size();
		modifiedStatementsByProperty.put(
				propertyId,
				modifiedStatementsByProperty.get(propertyId)
						+ updateStatements.size());

		System.out.println(entityId.getId() + ": fixing "
				+ updateStatements.size() + " statement(s) for " + propertyId
				+ " (" + modifiedEntities + " entities modified so far)");

		this.logfile.println("\n==" + entityId.getId() + "==\n"
				+ updateStatements.toString());

		if (modifiedEntities % 10 == 0) {
			this.logfile.flush();
			System.out.println("### " + modifiedStatements
					+ " statements modified so far: "
					+ modifiedStatementsByProperty.toString());
		}
	}
707057
@Override
    public boolean updateContext(IQueryContext context) {
        boolean result = false;
        
        for (IQueryFilter<T> filter : filters) {
            result |= filter.updateContext(context);
        }
        
        return result;
    }
135210
@Override
	public void updateRef(final int columnIndex, final Ref x) throws SQLException {
		wrapped.updateRef(columnIndex, x);
	}
933097
@Override
    public CaseFileInstance newCaseFileInstance(String deploymentId, String caseDefinition, Map<String, Object> data) {
        CaseDefinition def = caseRuntimeDataService.getCase(deploymentId, caseDefinition);
        if (def == null) {
            throw new CaseDefinitionNotFoundException("Case definition " + caseDefinition + " does not exist in deployment " + deploymentId);
        }
        CaseFileInstanceImpl caseFile = new CaseFileInstanceImpl(caseDefinition, data);
        caseFile.setupRoles(def.getCaseRoles());
        caseFile.setAccessRestrictions(def.getDataAccessRestrictions());
        
        return caseFile;
    }
1291332
public static void updateBegin(final Annotation annotation, final int begin)
    {
        annotation.removeFromIndexes();
        annotation.setBegin(begin);
        annotation.addToIndexes();
    }
705152
public void updateAssociations(JMFType type) {
    super.updateAssociations(type);
    if (getCaseCount() != ((JSVariant)type).getCaseCount())
      throw new IllegalStateException();
    if (cases != null)
      for (int i = 0; i < cases.length; i++)
         cases[i].updateAssociations(((JSVariant)type).getCase(i));
  }
815967
@Override
	public void update(
			final Serializable id,
			final Object[] fields,
			final int[] dirtyFields,
			final boolean hasDirtyCollection,
			final Object[] oldFields,
			final Object oldVersion,
			final Object object,
			final Object rowId,
			final SharedSessionContractImplementor session) throws HibernateException {

		//note: dirtyFields==null means we had no snapshot, and we couldn't get one using select-before-update
		//	  oldFields==null just means we had no snapshot to begin with (we might have used select-before-update to get the dirtyFields)

		//TODO support "multi table" entities
		final boolean[] tableUpdateNeeded = getTableUpdateNeeded( dirtyFields, hasDirtyCollection );
		final int span = getTableSpan();

		final boolean[] propsToUpdate;
		EntityEntry entry = session.getPersistenceContext().getEntry( object );

		// Ensure that an immutable or non-modifiable entity is not being updated unless it is
		// in the process of being deleted.
		if ( entry == null && ! isMutable() ) {
			throw new IllegalStateException( "Updating immutable entity that is not in session yet!" );
		}
		//we always use a dynamicUpdate model for Infinispan
		if ( (
				//getEntityMetamodel().isDynamicUpdate() &&
				dirtyFields != null ) ) {

			propsToUpdate = getPropertiesToUpdate( dirtyFields, hasDirtyCollection );
			// don't need to check laziness (dirty checking algorithm handles that)
		}
		else if ( ! isModifiableEntity( entry ) ) {
			//TODO does that apply to OGM?
			// We need to generate UPDATE SQL when a non-modifiable entity (e.g., read-only or immutable)
			// needs:
			// - to have references to transient entities set to null before being deleted
			// - to have version incremented do to a "dirty" association
			// If dirtyFields == null, then that means that there are no dirty properties to
			// to be updated; an empty array for the dirty fields needs to be passed to
			// getPropertiesToUpdate() instead of null.
			propsToUpdate = getPropertiesToUpdate(
					( dirtyFields == null ? ArrayHelper.EMPTY_INT_ARRAY : dirtyFields ),
					hasDirtyCollection
			);
			// don't need to check laziness (dirty checking algorithm handles that)
		}
		else {
			// For the case of dynamic-update="false", or no snapshot, we update all properties
			//TODO handle lazy
			propsToUpdate = getPropertyUpdateability( object );
		}

		final SessionFactoryImplementor factory = getFactory();
		if ( log.isTraceEnabled() ) {
			log.trace( "Updating entity: " + MessageHelper.infoString( this, id, factory ) );
			if ( isVersioned() ) {
				log.trace( "Existing version: " + oldVersion + " -> New version: " + fields[getVersionProperty()] );
			}
		}


		for ( int j = 0; j < span; j++ ) {
			// Now update only the tables with dirty properties (and the table with the version number)
			if ( tableUpdateNeeded[j] ) {
				final EntityKey key = EntityKeyBuilder.fromPersister( this, id, session );

				final boolean useVersion = j == 0 && isVersioned();

				if ( usesNonAtomicOptimisticLocking ) {
					final Tuple tupleInDatastore = getFreshTuple( key, session );
					final EntityMetamodel entityMetamodel = getEntityMetamodel();

					// Write any appropriate versioning conditional parameters
					if ( useVersion && entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.VERSION ) {
						if ( checkVersion( propsToUpdate ) ) {
							checkVersionAndRaiseSOSE( id, oldVersion, session, tupleInDatastore );
						}
					}
					else if ( isAllOrDirtyOptLocking() && oldFields != null ) {
						boolean[] versionability = getPropertyVersionability(); //TODO: is this really necessary????
						boolean[] includeOldField = entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.ALL
								? getPropertyUpdateability()
										: propsToUpdate;

						//TODO do a diff on the properties value from resultset and the dirty value
						GridType[] types = gridPropertyTypes;

						for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) {
							boolean include = includeOldField[i] &&
									isPropertyOfTable( i, j ) &&
									versionability[i]; //TODO: is this really necessary????
							if ( include ) {
								final GridType type = types[i];
								//FIXME what do do with settable?
								boolean[] settable = type.toColumnNullness( oldFields[i], factory );
								final Object snapshotValue = type.nullSafeGet(
										tupleInDatastore, getPropertyColumnNames( i ), session, object
										);

								if ( !type.isEqual( oldFields[i], snapshotValue, factory ) ) {
									raiseStaleObjectStateException( id );
								}
							}
						}
					}
				}

				TuplePointer tuplePointer = getSharedTuplePointer( key, object, session );
				Tuple resultset = tuplePointer.getTuple();
				resultset = createNewResultSetIfNull( key, resultset, id, session );
				resultset.setSnapshotType( SnapshotType.UPDATE );
				saveSharedTuple( object, resultset, session );

				if ( mightManageInverseAssociations ) {
					removeFromInverseAssociations( resultset, j, id, session );
				}
				dehydrate( resultset, fields, propsToUpdate, j, id, session );

				// TODO OGM-616 Also use this facet for "all columns" optimistic locking strategy
				if ( isVersioned() && optimisticLockingAwareGridDialect != null ) {
					Tuple oldVersionTuple = new Tuple();
					oldVersionTuple.put( getVersionColumnName(), oldVersion );

					boolean success = optimisticLockingAwareGridDialect.updateTupleWithOptimisticLock( key, oldVersionTuple, resultset, getTupleContext( session ) );

					// If there is an error handler registered, pass the applied/failed operation to it as needed
					if ( success ) {
						if ( invocationCollectingGridDialect != null ) {
							invocationCollectingGridDialect.onUpdateTupleWithOptimisticLockSuccess( key, oldVersionTuple, resultset );
						}
					}
					else {
						if ( invocationCollectingGridDialect != null ) {
							try {
								raiseStaleObjectStateException( id );
							}
							catch (Exception e) {
								invocationCollectingGridDialect.onUpdateTupleWithOptimisticLockFailure( key, oldVersionTuple, resultset, e );
							}
						}
						else {
							raiseStaleObjectStateException( id );
						}
					}
				}
				else {
					insertOrUpdateTuple( key, tuplePointer, hasUpdateGeneratedProperties(), session );
				}

				if ( mightManageInverseAssociations ) {
					addToInverseAssociations( resultset, j, id, session );
				}
			}
		}
	}
925469
protected void onSetCanEdit()
	{
		Field[] fields = ReflectionExtensions.getDeclaredFields(getType(), "serialVersionUID");
		canEdit = new boolean[fields.length];
		for (int i = 0; i < fields.length; i++)
		{
			canEdit[i] = false;
		}
	}
615925
private void update(Collection<ResolverTuple> underlyingTuples, Throwable t) {
        if (t != null)
            applyException(t);
        else if (underlyingTuples != null)
            applyUpdate(underlyingTuples);
        else
            applyException(null);
    }