Class FindByIndex

java.lang.Object
byps.BValueClass
de.elo.ix.client.ValueClass
de.elo.ix.client.FindByIndex
All Implemented Interfaces:
Serializable

public class FindByIndex extends ValueClass implements Serializable
Finds an object according to the object's index properties. The search terms are concatinated by the operator specified with FindOptions.searchMode. If FindOptionsC.OPERATOR_OR is the specified searchMode the members of this class are concatinated in the search string with the boolean operator "OR". Any other searchMode concatinates with "AND". Exception: userId and maskId are always used as "AND" terms.

Copyright: Copyright (c) 2004

Organisation: ELO Digital Office GmbH

See Also:
  • Field Details

    • delDateIso

      protected String delDateIso
      Find objects with this due date. It is a single date value or a date range in ISO format.
      See Also:
    • desc

      protected String desc
      Find objects with this term included in the description of the object (case insensitive). This value can be a list of terms separated by blanks. The terms are concatinated with the operator specified by FindOptions.searchMode. The wildcard * is allowed, it matches any number of characters. If desc is to be ignored this value must be set to null.
    • iDateIso

      protected String iDateIso
      Find objects with this internal date. It is a single date value or a date range in ISO format.
      See Also:
    • maskId

      protected String maskId
      Find objects related to this mask ID or name. If the mask relation is to be ignored this value must be set to an empty string or null.
      See Also:
    • name

      protected String name
      Find objects with this term(s) included in the name of the object (case insensitive). This value can be a list of terms separated with blanks. They are concatinated with the operator specified by FindOptions.searchMode. The wildcard * is allowed, it matches any number of characters. If name is to be ignored this value must be set to null.
      See Also:
    • exactName

      protected boolean exactName
      If this option is false, all objects are found that contain the term specified in name anywhere in their short description (Sord.name). In other words: a search by *name* is executed. Set this option true, if wildcards should not added implicitly to the search term.
      Since:
      7.00.000.035
    • objKeys

      protected ObjKey[] objKeys
      Find objects with this indexing attributes. The values of the attributes can contain a value range. The wildcard * is allowed in ObjKey.name and ObjKey.data[], it matches any number of characters. If objKeys is to be ignored this value must be set to null. The ObjKey.id is ignored, if ObjKey.name is not empty or ObjKey.id is 0. Searching over ObjKey.id can only handle one element in ObjKey.data.
    • ownerId

      protected String ownerId
      Find objects owned by the user with this user ID or name. If the owner is to be ignored this value must be set to null.
      See Also:
    • xDateIso

      protected String xDateIso
      Find objects with this external date. It is a single date value or a date range in ISO format.

      IX versions from 9.00.060 support relative date values. Relative date values give an offset to the current date and use a format similar to ISO format: "{+|-}YYYY-MM-DD hh:mm:ss", whereby the separator characters can be omitted: "{+|-}YYYYMMDDhhmmss". A relative date has to be prefixed by + (date is added) or - (date is subtracted).

      Examples, assuming the current date is 2016-06-24 16:29:00
      Relative date Resulting absolute date Remark
      +0001-00-00 00:00:00 2017-06-24 16:29 Next year, same month etc.
      -0000-01-00 00:00:00 2016-05-24 16:29 Previous month, same day etc.
      +0000 2016-01-01 00:00...2016-12-31 23:59 Search documents of this year. Incomplete relative dates are automatically expanded to a date range.
      +0000-00 2016-06-01 00:00...2016-06-30 23:59 Search documents of this month.
      -0000-01 2016-05-01 00:00...2016-05-31 23:59 Search documents of the last month.
      -0000-00-10...+0000-00-00 00:00:00 2016-06-14 00:00...2016-06-24 16:29 Search documents from the last 10 days.
      -0001... 2015-01-01 00:00... Search documents from last year or newer.

      Hint: Only relative date values are allowed that could also be an absolute date. E.g. a relative date of 100 days or 13 months cannot be specified.

      See Also:
    • acl

      protected String acl
      Constrain results to objects with this access control list.
      Since:
      7.00.000.010
    • pathId

      protected String pathId
      Storage path ID or name
      Since:
      7.00.000.045
    • kind

      protected String kind
      Colour. If the colour is to be ignored this value must be set to null.
      Since:
      8.00.030.003
    • lockId

      protected String lockId
      Set this value to an user's id or name to search for objects currently locked by that user. To ignore this option, set this value to null (default).
      Since:
      9.00.000.031
    • maskIds

      protected String[] maskIds
      Array of maskIds. Find objects associated to one of this keywording forms.
      Since:
      9.00.040.003
      See Also:
    • spaceGuids

      protected List<String> spaceGuids
      List of spaceGuids. Find objects that contain these spaceGuids.
      Since:
      21.03.000.012
    • deleteUser

      protected String deleteUser
      Find objects deleted by the user with this user ID or name. If the deleted user is to be ignored this value must be set to null.
      Since:
      10.00.020.014
    • deleteDateIso

      protected String deleteDateIso
      Find objects with this delete date. It is a single date value or a date range in ISO format.
      Since:
      10.00.020.014
      See Also:
    • aspects

      protected Map<String,FindByAspectValue> aspects
      Find objects according to this filter for aspect objects. The filter is a map of lists that uses a String as key and List of IndexSearchValue as value. To match an object all operations in IndexSearchValue must be fulfilled for the respective key. If you want to filter for different, non-overlapping values, then use the List of IndexSearchValues in FindByAspectValue.

      To give an example, lets take an aspect called "asp" which is associated under the name "a" to a mask. That aspect has a line called "aspl1" and another one called "aspl2". The type of "apsl1" is an Integer and we want all values that ranges between 5 and 20 or between 105 and 120. Then your code to create such a filter would look like this:
       var integerRange1 = new IndexSearchValue();
       integerRange1.intValues =
           List.of(new IndexSearchIntegerValue(IndexSearchOperator.GREATER_THAN, 5),
               new IndexSearchIntegerValue(IndexSearchOperator.LOWER_THAN, 20));
      
       var integerRange2 = new IndexSearchValue();
       integerRange2.intValues =
           List.of(new IndexSearchIntegerValue(IndexSearchOperator.GREATER_THAN, 105),
               new IndexSearchIntegerValue(IndexSearchOperator.LOWER_THAN, 120));
      
       var filterKeyAspl1 = "a¶asp¶aspl1";
      
       var filter = new HashMap<String, FindByAspectValue>();
       filter.put(filterKeyAspl1, new FindByAspectValue(integerRange1, integerRange2));
       
      Now there is need for an additional restriction: The index line "aspl2" (of type text) must be "hello world" in both of the above cases. We support this requirement by adding the appropriate key and IndexSearchValue to the filter object:
       var filterKeyAspl2 = "a¶asp¶aspl2";
       var stringRestriction = new IndexSearchValue();
       stringRestriction.stringValue =
           new IndexSearchStringValue(IndexSearchOperator.EQUALS, "hello world");
       filter.put(filterKeyAspl2, new FindByAspectValue(stringRestriction));
       
      As you can see in the code above the key in the map is composed of the AspectAssoc.name, the Aspect.name's name (or Aspect.id/ Aspect.guid), and the AspectLine.key. The separator must be the pilcrow symbol and there must always be two pilcrow symbols. A single pilcrow symbol will get treated as an input error as well as three pilcrow symbols. Escaping of pilcrow symbols is right out.

      You can leave some or all of the fields in the key blank as long as the separator symbols are present. The server treats an empty field as a wildcard. To give an example lets consider you have the same Aspect assigned multiple times to the same DocMask using different AspectAssocs (obviously). You want to search for value in all aspect objects regardless of there assiciation to a mask. To achieve this goal you simply do not set a value for AspectAssoc.name and the server will search the value in every aspect object data that matches the name of the Aspect and the key of the AspectLine.

      Please note that you can leave all the fields blank. This will lead to a search in all fields of every aspect table which in turn will lead to heavy load on the database server as it will perform a full table scan on every aspect table. So be strongly advised to not execute such searches in a regular manner.
      Even if you leave the AspectLine.key part blank there are some restrictions still: in case your condition is of type IndexSearchStringValue, the server will not look for the given filters in fields that cannot be converted from strings. Currently these are AspectLines of the types AspectLineC.TYPE_INTEGER and AspectLineC.TYPE_DOUBLE. Accordingly the Indexserver will not look in AspectLines of AspectLineC.TYPE_INTEGER if you specify a AspectLineC.TYPE_DOUBLE as search term.

      In case you specify SearchModeC.OR at FindOptions.searchMode only the junction mode of the FindByAspectValues changes to a disjunction. The conditions you define inside FindByAspectValue will be treated as stated in the documentation.
      Since:
      21.03.000.003
    • aspectSortOrder

      protected List<FindResultSortSpecification> aspectSortOrder
      This parameter controls an aspect-search's sorting of its results. You can leave this parameter empty or null to get the results from the database's default ordering. Please note that sorting the result leads to higher computational requirements and therefor lower performance.
      Since:
      21.04.000.000
    • includeChildMasks

      protected boolean includeChildMasks
      Set this flag to true if you want to include masks that inherit from the specified masks in maskId and maskIds.
      Since:
      21.04.000.011
  • Constructor Details

  • Method Details

    • getDeleteDateIso

      public String getDeleteDateIso()
    • setDeleteDateIso

      public void setDeleteDateIso(String deleteDateIso)
    • getDelDateIso

      public String getDelDateIso()
    • setDelDateIso

      public void setDelDateIso(String delDateIso)
    • getDesc

      public String getDesc()
    • setDesc

      public void setDesc(String desc)
    • getIDateIso

      public String getIDateIso()
    • setIDateIso

      public void setIDateIso(String iDateIso)
    • getMaskId

      public String getMaskId()
    • setMaskId

      public void setMaskId(String maskId)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getObjKeys

      public ObjKey[] getObjKeys()
    • setObjKeys

      public void setObjKeys(ObjKey[] objKeys)
    • getOwnerId

      public String getOwnerId()
    • setOwnerId

      public void setOwnerId(String ownerId)
    • getXDateIso

      public String getXDateIso()
    • setXDateIso

      public void setXDateIso(String xDateIso)
    • getAcl

      public String getAcl()
    • setAcl

      public void setAcl(String acl)
    • isExactName

      public boolean isExactName()
    • setExactName

      public void setExactName(boolean exactName)
    • getPathId

      public String getPathId()
    • setPathId

      public void setPathId(String pathId)
    • getKind

      public String getKind()
    • setKind

      public void setKind(String kind)
    • getLockId

      public String getLockId()
    • setLockId

      public void setLockId(String lockId)
    • getDeleteUser

      public String getDeleteUser()
    • getAspectSortOrder

      public List<FindResultSortSpecification> getAspectSortOrder()
    • setAspectSortOrder

      public void setAspectSortOrder(List<FindResultSortSpecification> aspectSortOrder)
    • setDeleteUser

      public void setDeleteUser(String deleteUser)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMaskIds

      public String[] getMaskIds()
    • setMaskIds

      public void setMaskIds(String[] maskIds)
    • getSpaceGuids

      public List<String> getSpaceGuids()
    • setSpaceGuids

      public void setSpaceGuids(List<String> spaceGuids)
    • getAspects

      public Map<String,FindByAspectValue> getAspects()
    • setAspects

      public void setAspects(Map<String,FindByAspectValue> aspects)
    • isIncludeChildMasks

      public boolean isIncludeChildMasks()
    • setIncludeChildMasks

      public void setIncludeChildMasks(boolean includeChildMasks)