Class SqaleUtils

java.lang.Object
com.evolveum.midpoint.repo.sqale.SqaleUtils

public class SqaleUtils extends Object
  • Field Details

    • SCHEMA_CHANGE_NUMBER

      public static final String SCHEMA_CHANGE_NUMBER
      Global metadata name for schema change number, related to
      See Also:
    • SCHEMA_AUDIT_CHANGE_NUMBER

      public static final String SCHEMA_AUDIT_CHANGE_NUMBER
      Global metadata name for schema audit change number
      See Also:
    • CURRENT_SCHEMA_CHANGE_NUMBER

      public static final int CURRENT_SCHEMA_CHANGE_NUMBER
      See Also:
    • CURRENT_SCHEMA_AUDIT_CHANGE_NUMBER

      public static final int CURRENT_SCHEMA_AUDIT_CHANGE_NUMBER
      See Also:
    • OWNER_OID

      public static final String OWNER_OID
      User Data Key used to attach owner Oid to prism container values in order to propagate OID even if parent full object is not present. THe owner oid knowledge is required for correctly computing filters in case of iterative search of containers NOTE: Role analysis tools use owner oid to get user oid from assignment search.
      See Also:
    • FULL_ID_PATH

      public static final String FULL_ID_PATH
      See Also:
    • REINDEX_NEEDED

      public static final String REINDEX_NEEDED
      See Also:
  • Constructor Details

    • SqaleUtils

      public SqaleUtils()
  • Method Details

    • objectVersionAsInt

      public static int objectVersionAsInt(ObjectType schemaObject)
      Returns version from midPoint object as a number.
      Throws:
      IllegalArgumentException - if the version is null or non-number
    • objectVersionAsInt

      public static int objectVersionAsInt(PrismObject<?> prismObject)
      Returns version from prism object as a number.
      Throws:
      IllegalArgumentException - if the version is null or non-number
    • oidToUuid

      @Nullable public static @Nullable UUID oidToUuid(@Nullable @Nullable String oid)
    • oidToUuidMandatory

      @NotNull public static @NotNull UUID oidToUuidMandatory(@NotNull @NotNull String oid)
    • getClass

      public static <S> Class<S> getClass(S object)
      Parametrized type friendly version of Object.getClass().
    • referenceWithTypeFixed

      public static ObjectReferenceType referenceWithTypeFixed(ObjectReferenceType value)
      Fixes reference type if `null` and tries to use default from definition. Use returned value.
    • handlePostgresException

      public static void handlePostgresException(Exception exception) throws ObjectAlreadyExistsException
      Throws more specific exception or returns and then original exception should be rethrown.
      Throws:
      ObjectAlreadyExistsException
    • isUniqueConstraintViolation

      public static boolean isUniqueConstraintViolation(Exception exception)
    • toString

      public static String toString(Object object)