Ejemplo n.º 1
0
    @Override
    public Map<String, String> getGenerationHashes() {
      Map<String, String> generationHashes =
          ModelDigestHelper.getInstance().getGenerationHashes(getSource());
      if (generationHashes != null) return generationHashes;

      return BinaryModelPersistence.getDigestMap(getSource());
    }
Ejemplo n.º 2
0
  public boolean generationRequired(SModelDescriptor sm, IOperationContext operationContext) {
    if (!sm.isGeneratable()) return false;
    if (sm instanceof EditableSModelDescriptor && ((EditableSModelDescriptor) sm).isChanged())
      return true;

    String currentHash = ModelDigestHelper.getInstance().getModelHashFast(sm, operationContext);
    if (currentHash == null) return true;

    String generatedHash = getGenerationHash(sm);
    if (generatedHash == null) return true;

    return !generatedHash.equals(currentHash);
  }
Ejemplo n.º 3
0
 public String currentHash(SModelDescriptor sm, IOperationContext operationContext) {
   return ModelDigestHelper.getInstance().getModelHashFast(sm, operationContext);
 }