All Packages Class Hierarchy This Package Previous Next Index
Class icc.db.Select
java.lang.Object
|
+----icc.db.Select
- public class Select
- extends Object
- implements Serializable
The Select class represents the selection criteria corresponding
a document search in the project database. The possible criteria are one or
more categories, an action type and reference date, an additional action
author, one or more attribute pairs, and a collaborative author.
- See Also:
- Folder
-
action
- This variable specifies the document action for time comparison.
-
ANY_VALUE
- A convenience constant to specify any attribute value.
-
attributes
- This table specifies the attributes common to all documents.
-
author
- This variable specifies the action author.
-
categories
- This vector specifies the categories common to all documents.
-
collabAuthor
- This variable specifies the collaborative author.
-
collabType
- This variable specifies the collaborative author type.
-
CREATION
- A convenience constant to specify the action as a creation.
-
date
- This variable specifies the reference date for time comparison.
-
LAST_EDIT
- A convenience constant to specify the action as the last edit.
-
MODIFICATION
- A convenience constant to specify the action as a modification.
-
newer
- This variable specifies whether the specified action on the selected
documents is relatively newer or older than the reference date.
-
READER
- A convenience constant to specify the collaborative author as a reader.
-
subprojects
- This variable specifies whether subprojects should be included in the
search.
-
WRITER
- A convenience constant to specify the collaborative author as a writer.
-
Select()
- Allocates a Select object corresponding a search for all
documents.
-
Select(boolean, Vector, String, Date, boolean, Integer, Hashtable, Integer, String)
-
-
Select(String, Date, boolean, Integer)
- Allocates a Select object to request a search for all
documents with the specified action newer/older than the specified date,
and authored by the specified partner.
-
attribute(String)
- Returns the defined attribute value for the specified type.
-
attributes()
- Returns an enumeration of the attributes.
-
copy(Select)
- Copies the specified selection information into this object.
-
equals(Object)
- Compares this object to the specified object.
-
getAction()
- Returns the action type specifier.
-
getAuthor()
- Returns the action author's username, if known.
-
getCategories()
- Returns the selection categories as a string with categories separated
by spaces.
-
getCollabAuthor()
- Returns the collaborative author's username, if known.
-
getDate()
- Returns the reference date as a string.
-
getDay()
- Gets the action day.
-
getHour()
- Gets the action hour.
-
getMinute()
- Gets the action minute.
-
getMonth()
- Gets the action month.
-
getTime()
- Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the reference date.
-
getYear()
- Gets the action year.
-
hasAttributes()
- Returns the number of attributes defined for this selection.
-
isNewer()
- Returns whether the specified action on the selected
documents is relatively newer or older than the reference date.
-
isNewer(Boolean)
- Sets whether the specified action on the selected
documents is relatively newer or older than the reference date.
-
removeAttribute(String)
- Removes an attribute.
-
search(Integer)
- Creates a data request to search for documents corresponding the
specified project identifier and this selection information.
-
search(Integer, boolean)
- Creates a data request to search for documents corresponding the
specified project identifier and this selection information.
-
search(Integer, boolean, String, String)
- Creates a data request to search for documents corresponding the
specified project identifier and this selection information.
-
setAction(String)
- Sets the action type specifier.
-
setAttribute(String)
- Sets an attribute to allow any value.
-
setAttribute(String, String)
- Sets an attribute.
-
setAuthor(String)
- Sets the action author by username.
-
setByDays(float)
- Sets the reference date in days before now.
-
setByHours(float)
- Sets the reference date in hours before now.
-
setByMinutes(float)
- Sets the reference date in minutes before now.
-
setByMonths(float)
- Sets the reference date in months before now.
-
setByYears(float)
- Sets the reference date in years before now.
-
setCategories(String)
- Sets the selection categories.
-
setCollabAuthor(String)
- Sets the collaborative author by username.
-
setCollabType(String)
- Sets the collaborative author type.
-
setDate(int, int, int, int, int)
- Sets the reference date.
-
setDate(String)
- Sets the reference date.
-
setTime(long)
- Sets the reference date to represent the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.
CREATION
public static final String CREATION
- A convenience constant to specify the action as a creation.
- See Also:
- action
MODIFICATION
public static final String MODIFICATION
- A convenience constant to specify the action as a modification.
- See Also:
- action
LAST_EDIT
public static final String LAST_EDIT
- A convenience constant to specify the action as the last edit.
- See Also:
- action
ANY_VALUE
public static final String ANY_VALUE
- A convenience constant to specify any attribute value.
- See Also:
- attributes
WRITER
public static final String WRITER
- A convenience constant to specify the collaborative author as a writer.
- See Also:
- type
READER
public static final String READER
- A convenience constant to specify the collaborative author as a reader.
- See Also:
- type
categories
public Vector categories
- This vector specifies the categories common to all documents.
action
public String action
- This variable specifies the document action for time comparison.
A null value is identical to "creation".
date
public Date date
- This variable specifies the reference date for time comparison.
A null value corresponds to "at the latest moment".
newer
public boolean newer
- This variable specifies whether the specified action on the selected
documents is relatively newer or older than the reference date.
The default value false.
author
public Integer author
- This variable specifies the action author.
- See Also:
- action
attributes
public Hashtable attributes
- This table specifies the attributes common to all documents.
If the attribute value equals to ANY_VALUE, only the
attribute type is tested for presence.
- See Also:
- ANY_VALUE
collabAuthor
public Integer collabAuthor
- This variable specifies the collaborative author.
collabType
public String collabType
- This variable specifies the collaborative author type. Valid types are
WRITER, READER and ANY_VALUE.
If the latter is chosen, the collaborative author can be any type.
- See Also:
- WRITER, READER, ANY_VALUE
subprojects
public boolean subprojects
- This variable specifies whether subprojects should be included in the
search. The default value false.
Select
Select(boolean subprojects,
Vector categories,
String action,
Date date,
boolean newer,
Integer author,
Hashtable attributes,
Integer collabAuthor,
String collabType)
Select
public Select()
- Allocates a Select object corresponding a search for all
documents.
Select
public Select(String action,
Date date,
boolean newer,
Integer author)
- Allocates a Select object to request a search for all
documents with the specified action newer/older than the specified date,
and authored by the specified partner.
- Parameters:
- action - the action type
- date - a reference date
- newer - a boolean value specifying the time as newer or older
with respect to the reference date
- author - the action author
getAction
public String getAction()
- Returns the action type specifier.
This method is accessible from JavaScript.
- Returns:
- an action type
getDate
public String getDate()
- Returns the reference date as a string.
If the date is equal to null, "now" is returned.
This method is accessible from JavaScript.
- Returns:
- a date string
isNewer
public boolean isNewer()
- Returns whether the specified action on the selected
documents is relatively newer or older than the reference date.
This method is accessible from JavaScript.
- Returns:
- a boolean value
getAuthor
public String getAuthor()
- Returns the action author's username, if known. Otherwise, "guest" is
returned. This method is accessible from JavaScript.
- Returns:
- a username
getCollabAuthor
public String getCollabAuthor()
- Returns the collaborative author's username, if known. Otherwise,
"guest" is returned. This method is accessible from JavaScript.
- Returns:
- a username
getCategories
public String getCategories()
- Returns the selection categories as a string with categories separated
by spaces. This method is accessible from JavaScript.
- Returns:
- a string of categories separated by spaces
setCategories
public boolean setCategories(String categories)
- Sets the selection categories. Each term in the specified string
string is considered a selection category.
Any previously specified categories are lost.
This method is accessible from JavaScript.
- Parameters:
- categories - a string of categories separated by spaces
- Returns:
- true if each of the terms has no more than 20
characters; false otherwise
setAction
public void setAction(String action)
- Sets the action type specifier.
This method is accessible from JavaScript.
- Parameters:
- action - an action type
getTime
public long getTime()
- Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the reference date.
This method is accessible from JavaScript.
- Returns:
- the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the reference date.
getYear
public int getYear()
- Gets the action year. This method is accessible from JavaScript.
- Returns:
- the value of the YEAR time field
getMonth
public int getMonth()
- Gets the action month. This method is accessible from JavaScript.
- Returns:
- the value of the MONTH time field.
Month value is 0-based. e.g., 0 for January.
getDay
public int getDay()
- Gets the action day. This method is accessible from JavaScript.
- Returns:
- the value of the DAY_OF_MONTH time field
getHour
public int getHour()
- Gets the action hour. This method is accessible from JavaScript.
- Returns:
- the value of the HOUR_OF_DAY time field
getMinute
public int getMinute()
- Gets the action minute. This method is accessible from JavaScript.
- Returns:
- the value of the MINUTE time field
setDate
public void setDate(String date)
- Sets the reference date.
This method is accessible from JavaScript.
- Parameters:
- date - a date string
setDate
public void setDate(int year,
int month,
int day,
int hour,
int minute)
- Sets the reference date.
This method is accessible from JavaScript.
- Parameters:
- year - the value used to set the YEAR time field
- month - the value used to set the MONTH time field.
Month value is 0-based. e.g., 0 for January.
- day - the value used to set the DATE time field
- hour - the value used to set the HOUR_OF_DAY time field
- minute - the value used to set the MINUTE time field
setTime
public void setTime(long time)
- Sets the reference date to represent the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.
This method is accessible from JavaScript.
- Parameters:
- time - the number of milliseconds
setByYears
public void setByYears(float years)
- Sets the reference date in years before now.
This method is accessible from JavaScript.
- Parameters:
- years - the number of years before now
setByMonths
public void setByMonths(float months)
- Sets the reference date in months before now.
This method is accessible from JavaScript.
- Parameters:
- months - the number of months before now
setByDays
public void setByDays(float days)
- Sets the reference date in days before now.
This method is accessible from JavaScript.
- Parameters:
- days - the number of days before now
setByHours
public void setByHours(float hours)
- Sets the reference date in hours before now.
This method is accessible from JavaScript.
- Parameters:
- hours - the number of hours before now
setByMinutes
public void setByMinutes(float minutes)
- Sets the reference date in minutes before now.
This method is accessible from JavaScript.
- Parameters:
- minutes - the number of minutes before now
isNewer
public void isNewer(Boolean newer)
- Sets whether the specified action on the selected
documents is relatively newer or older than the reference date.
This method is accessible from JavaScript.
- Parameters:
- newer - a boolean value
setAuthor
public boolean setAuthor(String username)
- Sets the action author by username.
Returns false if the username is unrecognized.
This method is accessible from JavaScript.
- Parameters:
- username - a username
- Returns:
- true if the action author is not null;
false otherwise
setCollabAuthor
public boolean setCollabAuthor(String username)
- Sets the collaborative author by username.
Returns false if the username is unrecognized.
This method is accessible from JavaScript.
- Parameters:
- username - a username
- Returns:
- true if the action author is not null;
false otherwise
setCollabType
public void setCollabType(String type)
- Sets the collaborative author type.
This method is accessible from JavaScript.
- Parameters:
- type - a type
hasAttributes
public int hasAttributes()
- Returns the number of attributes defined for this selection.
- Returns:
- the number of attributes
attribute
public String attribute(String type)
- Returns the defined attribute value for the specified type.
- Parameters:
- type - the attribute ktype
- Returns:
- the attribute value
attributes
public Enumeration attributes()
- Returns an enumeration of the attributes. Use the Enumeration
methods on the returned object to fetch the elements sequentially.
- Returns:
- an enumeration of the attributes
setAttribute
public void setAttribute(String type)
- Sets an attribute to allow any value.
Any previous setting for this attribute is lost.
- Parameters:
- type - the attribute type
- See Also:
- alter
setAttribute
public void setAttribute(String type,
String value)
- Sets an attribute. Any previous setting for this attribute is lost.
- Parameters:
- type - the attribute type
- value - the attribute value
- See Also:
- alter
removeAttribute
public void removeAttribute(String type)
- Removes an attribute.
Altering the document's attributes has no actual effect until these
attributes are also updated in the database.
- Parameters:
- type - the attribute type
- See Also:
- alter
equals
public boolean equals(Object object)
- Compares this object to the specified object.
The result is true if and only if the argument is not
null and is a Select object that has the same
criteria defined.
- Parameters:
- object - the object to compare with
- Returns:
- true if the objects are the same;
false otherwise
- Overrides:
- equals in class Object
copy
public void copy(Select from)
- Copies the specified selection information into this object.
- Parameters:
- from - the selection information to be copied
search
public DataRequest search(Integer project)
- Creates a data request to search for documents corresponding the
specified project identifier and this selection information. The result
of this request is a vector of folders corresponding the project cubes
with selected documents' identifiers.
Only documents for which the partner has read permission will result.
- Parameters:
- project - a project identifier as a string
- Returns:
- a data request to provide document counts
- See Also:
- SERVICE
search
public DataRequest search(Integer project,
boolean complete)
- Creates a data request to search for documents corresponding the
specified project identifier and this selection information. The result
of this request is a vector of folders corresponding the project cubes
with selected documents. The folders contain either documents or
document headers, depending on whether the parameter complete
is set to true or false, respectively.
Only documents for which the partner has read permission will result.
- Parameters:
- project - a project identifier
- complete - a boolean value
- Returns:
- a data request to search for documents
- See Also:
- SERVICE
search
public DataRequest search(Integer project,
boolean complete,
String filetype,
String expansion)
- Creates a data request to search for documents corresponding the
specified project identifier and this selection information.
Additionally, a file type and expansion link name may be specified.
The result of this request is a vector of folders corresponding the
project cubes with selected documents. The folders contain either
documents or document headers, depending on whether the parameter
complete is set to true or false,
respectively.
Only documents for which the partner has read permission will result.
- Parameters:
- project - a project identifier
- complete - a boolean value
- Returns:
- a data request to search for documents
- See Also:
- SERVICE, Folder
All Packages Class Hierarchy This Package Previous Next Index
This website has been archived and is no longer maintained.