code: private boolean hasCompatibleSearchData(
          CmsGalleryDataBean originalGalleryData,
          CmsGalleryDataBean data,
          CmsGallerySearchBean search) {
  
          Set<String> originalUsableTypes = Sets.newHashSet();
          Set<String> usableTypes = Sets.newHashSet();
          for (CmsResourceTypeBean type : originalGalleryData.getTypes()) {
              if (!type.isDeactivated()) {
                  originalUsableTypes.add(type.getType());
              }
          }
          for (CmsResourceTypeBean type : data.getTypes()) {
              if (!type.isDeactivated()) {
                  usableTypes.add(type.getType());
              }
          }
          if (!usableTypes.containsAll(originalUsableTypes)) {
              return false;
          }
          return true;
      }
docs: Checks if results for the stored gallery data can be restored for the new gallery data.<p>
  
  @param originalGalleryData the original gallery data
  @param data the new gallery data
  @param search the search bean
  
  @return true if the original and new gallery data are compatible, i.e. we can restore the search results