Class GetOperationOptions

    • Constructor Detail

      • GetOperationOptions

        public GetOperationOptions()
    • Method Detail

      • createRetrieve

        public static GetOperationOptions createRetrieve()
        Specifies whether to return specific items. It is used for optimizations. Some requests only needs a subset of items therefore fetching them all is a waste of resources. Other requests may need expensive data that are not normally returned by default.

        If no retrieve option is set in the entire options set then it means that the whole object with a default set of properties has to be returned. This is equivalent to specifying DEFAULT retrieve root option.

        If there is at least one retrieve option in the set then the following rules apply:

        • Items marked as INCLUDE will be returned.
        • Any item marked as EXCLUDE may not be returned. (Note: Excluded items may still be returned if their retrieval is cheap.)
        • Items marked as DEFAULT will be returned if they would also be returned without any options (by default).
        • Items that are not marked (have no option or have null retrieve option) but their superitem is marked (have retrieve option) behave in the same way as superitem. E.g. if a superitem is marked as INCLUDE they will also be included in the result. This also applies transitively (e.g. superitem of superitem).
        • If a superitem is marked as EXCLUDE and subitem is marked as INCLUDE then the behavior is undefined. Do not do this. Strange things may happen.
        • For items that are not marked in any way and for which the superitem is also not marked the "I do not care" behavior is assumed. This means that they may be returned or they may be not. The implementation will return them if their retrieval is cheap but they will be most likely omitted from the result.
      • createDontRetrieve

        public static GetOperationOptions createDontRetrieve()
        Specifies whether to return specific items. It is used for optimizations. Some requests only needs a subset of items therefore fetching them all is a waste of resources. Other requests may need expensive data that are not normally returned by default.

        If no retrieve option is set in the entire options set then it means that the whole object with a default set of properties has to be returned. This is equivalent to specifying DEFAULT retrieve root option.

        If there is at least one retrieve option in the set then the following rules apply:

        • Items marked as INCLUDE will be returned.
        • Any item marked as EXCLUDE may not be returned. (Note: Excluded items may still be returned if their retrieval is cheap.)
        • Items marked as DEFAULT will be returned if they would also be returned without any options (by default).
        • Items that are not marked (have no option or have null retrieve option) but their superitem is marked (have retrieve option) behave in the same way as superitem. E.g. if a superitem is marked as INCLUDE they will also be included in the result. This also applies transitively (e.g. superitem of superitem).
        • If a superitem is marked as EXCLUDE and subitem is marked as INCLUDE then the behavior is undefined. Do not do this. Strange things may happen.
        • For items that are not marked in any way and for which the superitem is also not marked the "I do not care" behavior is assumed. This means that they may be returned or they may be not. The implementation will return them if their retrieval is cheap but they will be most likely omitted from the result.
      • createRetrieve

        public static GetOperationOptions createRetrieve​(RelationalValueSearchQuery query)
        Specifies whether to return specific items. It is used for optimizations. Some requests only needs a subset of items therefore fetching them all is a waste of resources. Other requests may need expensive data that are not normally returned by default.

        If no retrieve option is set in the entire options set then it means that the whole object with a default set of properties has to be returned. This is equivalent to specifying DEFAULT retrieve root option.

        If there is at least one retrieve option in the set then the following rules apply:

        • Items marked as INCLUDE will be returned.
        • Any item marked as EXCLUDE may not be returned. (Note: Excluded items may still be returned if their retrieval is cheap.)
        • Items marked as DEFAULT will be returned if they would also be returned without any options (by default).
        • Items that are not marked (have no option or have null retrieve option) but their superitem is marked (have retrieve option) behave in the same way as superitem. E.g. if a superitem is marked as INCLUDE they will also be included in the result. This also applies transitively (e.g. superitem of superitem).
        • If a superitem is marked as EXCLUDE and subitem is marked as INCLUDE then the behavior is undefined. Do not do this. Strange things may happen.
        • For items that are not marked in any way and for which the superitem is also not marked the "I do not care" behavior is assumed. This means that they may be returned or they may be not. The implementation will return them if their retrieval is cheap but they will be most likely omitted from the result.
      • getResolve

        public Boolean getResolve()
      • setResolve

        public void setResolve​(Boolean resolve)
      • createResolve

        public static GetOperationOptions createResolve()
        Resolve the object reference. This only makes sense with a (path-based) selector.
      • getNoFetch

        public Boolean getNoFetch()
      • setNoFetch

        public void setNoFetch​(Boolean noFetch)
      • createNoFetch

        public static GetOperationOptions createNoFetch()
        No not fetch any information from external sources, e.g. do not fetch account data from resource, do not fetch resource schema, etc. Such operation returns only the data stored in midPoint repository.
      • getResolveNames

        public Boolean getResolveNames()
      • setResolveNames

        public void setResolveNames​(Boolean resolveNames)
      • createResolveNames

        public static GetOperationOptions createResolveNames()
        Resolve the object reference names.
      • getTolerateRawData

        public Boolean getTolerateRawData()
      • setTolerateRawData

        public void setTolerateRawData​(Boolean value)
      • createTolerateRawData

        public static GetOperationOptions createTolerateRawData()
        Tolerate "raw" data in returned object. In some cases, raw data are tolerated by default (e.g. if raw=true and the object is ResourceType or ShadowType). But generally, toleration of raw data can be explicitly requested by setting this flag to TRUE.
      • setRaw

        public void setRaw​(Boolean raw)
      • createRaw

        public static GetOperationOptions createRaw()
        Avoid any smart processing of the data except for schema application. Do not synchronize the data, do not apply any expressions, etc.
      • createRawCollection

        public static Collection<SelectorOptions<GetOperationOptions>> createRawCollection()
        Avoid any smart processing of the data except for schema application. Do not synchronize the data, do not apply any expressions, etc.
      • createNoFetchCollection

        public static Collection<SelectorOptions<GetOperationOptions>> createNoFetchCollection()
        No not fetch any information from external sources, e.g. do not fetch account data from resource, do not fetch resource schema, etc. Such operation returns only the data stored in midPoint repository.
      • getDoNotDiscovery

        public Boolean getDoNotDiscovery()
      • setDoNotDiscovery

        public void setDoNotDiscovery​(Boolean force)
      • createDoNotDiscovery

        public static GetOperationOptions createDoNotDiscovery()
        Force to get object from the resource even if some of the error occurred. If the any copy of the shadow is fetched, we can't delete this object from the gui, for example
      • createAllowNotFound

        public static GetOperationOptions createAllowNotFound()
        This flag indicated if the "object not found" error is critical for processing the original request. If it is not, we just ignore it and don't log it. In other cases, error in logs may lead to misleading information..
      • getAllowNotFound

        public Boolean getAllowNotFound()
      • setAllowNotFound

        public void setAllowNotFound​(Boolean allowNotFound)
      • createReadOnly

        public static GetOperationOptions createReadOnly()
        Return read-only object. The returned object will be only read by the client. The client will not modify it. Immutable object is returned if it is possible. This option allows to turn on internal optimization (e.g. avoid cloning the values). It should be used at all times when the client do not plan to modify the returned object.
      • getReadOnly

        public Boolean getReadOnly()
      • setReadOnly

        public void setReadOnly​(Boolean readOnly)
      • setPointInTimeType

        public void setPointInTimeType​(PointInTimeType pointInTimeType)
      • createPointInTimeType

        public static GetOperationOptions createPointInTimeType​(PointInTimeType pit)
        Specifies the point in time for the returned data. This option controls whether fresh or cached data will be returned or whether future data projection will be returned. MidPoint usually deals with fresh data that describe situation at the current point in time. But the client code may want to get data from the cache that may be possibly stale. Or the client code may want a projection about the future state of the data (e.g. taking running asynchronous operation into consideration). If this option is not specified then the current point in time is the default if no staleness option is specified or if it is zero. If non-zero staleness option is specified then this option defaults to cached data.
      • getStaleness

        public Long getStaleness()
      • setStaleness

        public void setStaleness​(Long staleness)
      • createStaleness

        public static GetOperationOptions createStaleness​(Long staleness)
        Requirement how stale or fresh the retrieved data should be. It specifies maximum age of the value in milliseconds. The default value is zero, which means that a fresh value must always be returned. This means that caches that do not guarantee fresh value cannot be used. If non-zero value is specified then such caches may be used. In case that Long.MAX_VALUE is specified then the caches are always used and fresh value is never retrieved.
      • getForceRefresh

        public Boolean getForceRefresh()
      • setForceRefresh

        public void setForceRefresh​(Boolean forceRefresh)
      • getForceRetry

        public Boolean getForceRetry()
      • setForceRetry

        public void setForceRetry​(Boolean forceRetry)
      • getDistinct

        public Boolean getDistinct()
      • setDistinct

        public void setDistinct​(Boolean distinct)
      • createDistinct

        @Experimental
        public static GetOperationOptions createDistinct()
        Should the results be made distinct. Not all providers support this option.

        BEWARE: - may bring a potentially huge performance penalty - may interfere with paging (!)

        So please consider this option an EXPERIMENTAL, for now.

      • getAttachDiagData

        public Boolean getAttachDiagData()
      • setAttachDiagData

        public void setAttachDiagData​(Boolean value)
      • createAttachDiagData

        public static GetOperationOptions createAttachDiagData()
        Whether to attach diagnostics data to the returned object(s).
      • getExecutionPhase

        public Boolean getExecutionPhase()
      • setExecutionPhase

        public void setExecutionPhase​(Boolean executionPhase)
      • createIterationMethod

        public static GetOperationOptions createIterationMethod​(IterationMethodType value)
        Whether to override default iteration method (in searchObjectsIterative) configured for particular DBMS.
      • setRelationalValueSearchQuery

        public void setRelationalValueSearchQuery​(RelationalValueSearchQuery relationalValueSearchQuery)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • shortDump

        public void shortDump​(StringBuilder sb)
        Description copied from interface: ShortDumpable
        Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.
        Specified by:
        shortDump in interface ShortDumpable
        Parameters:
        sb - StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.