code: private int getUpdateState(CmsDbContext dbc, CmsResource resource, List<CmsProperty> properties)
      throws CmsDataAccessException {
  
          int updateState = 0;
          I_CmsVfsDriver vfsDriver = getVfsDriver(dbc);
          Iterator<CmsProperty> it = properties.iterator();
          while (it.hasNext() && (updateState < 2)) {
              CmsProperty property = it.next();
  
              // read existing property
              CmsProperty existingProperty = vfsDriver.readPropertyObject(
                  dbc,
                  property.getName(),
                  dbc.currentProject(),
                  resource);
  
              // check the shared property
              if (property.getResourceValue() != null) {
                  if (property.isDeleteResourceValue()) {
                      if (existingProperty.getResourceValue() != null) {
                          updateState = 2; // deleted
                      }
                  } else {
                      if (existingProperty.getResourceValue() == null) {
                          updateState = 2; // created
                      } else {
                          if (!property.getResourceValue().equals(existingProperty.getResourceValue())) {
                              updateState = 2; // updated
                          }
                      }
                  }
              }
              if (updateState == 0) {
                  // check the individual property only if needed
                  if (property.getStructureValue() != null) {
                      if (property.isDeleteStructureValue()) {
                          if (existingProperty.getStructureValue() != null) {
                              updateState = 1; // deleted
                          }
                      } else {
                          if (existingProperty.getStructureValue() == null) {
                              updateState = 1; // created
                          } else {
                              if (!property.getStructureValue().equals(existingProperty.getStructureValue())) {
                                  updateState = 1; // updated
                              }
                          }
                      }
                  }
              }
          }
          return updateState;
      }
docs: Returns if and what state needs to be updated.<p>
  
  @param dbc the db context
  @param resource the resource
  @param properties the properties to check
  
  @return 0: none, 1: structure, 2: resource
  
  @throws CmsDataAccessException if something goes wrong