Package de.elo.ix.client
Class FindByIndex
java.lang.Object
byps.BValueClass
de.elo.ix.client.ValueClass
de.elo.ix.client.FindByIndex
- All Implemented Interfaces:
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Constrain results to objects with this access control list.protected Map<String,
FindByAspectValue> Find objects according to this filter for aspect objects.protected List<FindResultSortSpecification>
This parameter controls an aspect-search's sorting of its results.protected String
Find objects with this due date.protected String
Find objects with this delete date.protected String
Find objects deleted by the user with this user ID or name.protected String
Find objects with this term included in the description of the object (case insensitive).protected boolean
If this option is false, all objects are found that contain the term specified inname
anywhere in their short description (Sord.name).protected String
Find objects with this internal date.protected boolean
protected String
Colour.protected String
Set this value to an user's id or name to search for objects currently locked by that user.protected String
Find objects related to this mask ID or name.protected String[]
Array of maskIds.protected String
Find objects with this term(s) included in the name of the object (case insensitive).protected ObjKey[]
Find objects with this indexing attributes.protected String
Find objects owned by the user with this user ID or name.protected String
Storage path ID or nameList of spaceGuids.protected String
Find objects with this external date.Fields inherited from class byps.BValueClass
bypsClient, changedMembers, dbHelper, FLAG_SEALED, flags
-
Constructor Summary
ConstructorsConstructorDescriptionFindByIndex
(FindByIndex rhs) FindByIndex
(String delDateIso, String desc, String iDateIso, String maskId, String name, ObjKey[] objKeys, String ownerId, String xDateIso, String kind, List<String> spaceGuids) -
Method Summary
Modifier and TypeMethodDescriptiongetAcl()
getDesc()
getKind()
String[]
getName()
ObjKey[]
boolean
boolean
void
void
setAspects
(Map<String, FindByAspectValue> aspects) void
setAspectSortOrder
(List<FindResultSortSpecification> aspectSortOrder) void
setDelDateIso
(String delDateIso) void
setDeleteDateIso
(String deleteDateIso) void
setDeleteUser
(String deleteUser) void
void
setExactName
(boolean exactName) void
setIDateIso
(String iDateIso) void
setIncludeChildMasks
(boolean includeChildMasks) void
void
void
void
setMaskIds
(String[] maskIds) void
void
setObjKeys
(ObjKey[] objKeys) void
setOwnerId
(String ownerId) void
void
setSpaceGuids
(List<String> spaceGuids) void
setXDateIso
(String xDateIso) toString()
Methods inherited from class byps.BValueClass
getBypsClient, getChangedMembers, getDbHelper, isChangedMember, isSealed, seal, seal, setBypsClient, setChangedMember, setChangedMembers, setDbHelper
-
Field Details
-
delDateIso
Find objects with this due date. It is a single date value or a date range in ISO format.- See Also:
-
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
Find objects with this internal date. It is a single date value or a date range in ISO format.- See Also:
-
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
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 exactNameIf this option is false, all objects are found that contain the term specified inname
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
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
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
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
Constrain results to objects with this access control list.- Since:
- 7.00.000.010
-
pathId
Storage path ID or name- Since:
- 7.00.000.045
-
kind
Colour. If the colour is to be ignored this value must be set to null.- Since:
- 8.00.030.003
-
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 tonull
(default).- Since:
- 9.00.000.031
-
maskIds
Array of maskIds. Find objects associated to one of this keywording forms.- Since:
- 9.00.040.003
- See Also:
-
spaceGuids
List of spaceGuids. Find objects that contain these spaceGuids.- Since:
- 21.03.000.012
-
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
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
Find objects according to this filter for aspect objects. The filter is a map of lists that uses aString
as key andList
ofIndexSearchValue
as value. To match an object all operations inIndexSearchValue
must be fulfilled for the respective key. If you want to filter for different, non-overlapping values, then use theList
ofIndexSearchValue
s inFindByAspectValue
.
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 andIndexSearchValue
to thefilter
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 theAspectAssoc.name
, theAspect.name
's name (orAspect.id
/Aspect.guid
), and theAspectLine.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 sameAspect
assigned multiple times to the sameDocMask
using differentAspectAssoc
s (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 forAspectAssoc.name
and the server will search the value in every aspect object data that matches the name of theAspect
and the key of theAspectLine
.
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 theAspectLine.key
part blank there are some restrictions still: in case your condition is of typeIndexSearchStringValue
, the server will not look for the given filters in fields that cannot be converted from strings. Currently these areAspectLine
s of the typesAspectLineC.TYPE_INTEGER
andAspectLineC.TYPE_DOUBLE
. Accordingly the Indexserver will not look inAspectLine
s ofAspectLineC.TYPE_INTEGER
if you specify aAspectLineC.TYPE_DOUBLE
as search term.
In case you specifySearchModeC.OR
atFindOptions.searchMode
only the junction mode of theFindByAspectValue
s changes to a disjunction. The conditions you define insideFindByAspectValue
will be treated as stated in the documentation.- Since:
- 21.03.000.003
-
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 includeChildMasksSet this flag totrue
if you want to include masks that inherit from the specified masks inmaskId
andmaskIds
.- Since:
- 21.04.000.011
-
-
Constructor Details
-
FindByIndex
public FindByIndex() -
FindByIndex
-
FindByIndex
-
-
Method Details
-
getDeleteDateIso
-
setDeleteDateIso
-
getDelDateIso
-
setDelDateIso
-
getDesc
-
setDesc
-
getIDateIso
-
setIDateIso
-
getMaskId
-
setMaskId
-
getName
-
setName
-
getObjKeys
-
setObjKeys
-
getOwnerId
-
setOwnerId
-
getXDateIso
-
setXDateIso
-
getAcl
-
setAcl
-
isExactName
public boolean isExactName() -
setExactName
public void setExactName(boolean exactName) -
getPathId
-
setPathId
-
getKind
-
setKind
-
getLockId
-
setLockId
-
getDeleteUser
-
getAspectSortOrder
-
setAspectSortOrder
-
setDeleteUser
-
toString
-
getMaskIds
-
setMaskIds
-
getSpaceGuids
-
setSpaceGuids
-
getAspects
-
setAspects
-
isIncludeChildMasks
public boolean isIncludeChildMasks() -
setIncludeChildMasks
public void setIncludeChildMasks(boolean includeChildMasks)
-