Skip to content

Commit

Permalink
DeleteObjectResult doesn't use and doesn't need language
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 9, 2020
1 parent 008922e commit 571b5ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
Expand Up @@ -8,20 +8,18 @@
package com.evolveum.midpoint.repo.api;

/**
* Contains information about object deletion result; primarily needed by repository caching algorithms.
* Because it is bound to the current (SQL) implementation of the repository, avoid using this information
* for any other purposes.
*
* EXPERIMENTAL.
* Contains information about object deletion result; primarily needed by repository caching algorithms.
* Because it is bound to the current (SQL) implementation of the repository, avoid using this information
* for any other purposes.
* <p>
* EXPERIMENTAL.
*/
public class DeleteObjectResult {

private final String objectTextRepresentation;
private final String language;

public DeleteObjectResult(String objectTextRepresentation, String language) {
public DeleteObjectResult(String objectTextRepresentation) {
this.objectTextRepresentation = objectTextRepresentation;
this.language = language;
}

/**
Expand All @@ -32,11 +30,4 @@ public DeleteObjectResult(String objectTextRepresentation, String language) {
public String getObjectTextRepresentation() {
return objectTextRepresentation;
}

/**
* Language in which the text representation is encoded.
*/
public String getLanguage() {
return language;
}
}
Expand Up @@ -343,8 +343,7 @@ public <T extends ObjectType> DeleteObjectResult deleteObjectAttempt(Class<T> ty

session.getTransaction().commit();
return new DeleteObjectResult(
RUtil.getSerializedFormFromByteArray(object.getFullObject()),
SqlRepositoryServiceImpl.DATA_LANGUAGE);
RUtil.getSerializedFormFromByteArray(object.getFullObject()));
} catch (ObjectNotFoundException ex) {
baseHelper.rollbackTransaction(session, ex, result, true);
throw ex;
Expand Down

0 comments on commit 571b5ff

Please sign in to comment.