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

Variable Index

 o action
This variable specifies the document action for time comparison.
 o ANY_VALUE
A convenience constant to specify any attribute value.
 o attributes
This table specifies the attributes common to all documents.
 o author
This variable specifies the action author.
 o categories
This vector specifies the categories common to all documents.
 o collabAuthor
This variable specifies the collaborative author.
 o collabType
This variable specifies the collaborative author type.
 o CREATION
A convenience constant to specify the action as a creation.
 o date
This variable specifies the reference date for time comparison.
 o LAST_EDIT
A convenience constant to specify the action as the last edit.
 o MODIFICATION
A convenience constant to specify the action as a modification.
 o newer
This variable specifies whether the specified action on the selected documents is relatively newer or older than the reference date.
 o READER
A convenience constant to specify the collaborative author as a reader.
 o subprojects
This variable specifies whether subprojects should be included in the search.
 o WRITER
A convenience constant to specify the collaborative author as a writer.

Constructor Index

 o Select()
Allocates a Select object corresponding a search for all documents.
 o Select(boolean, Vector, String, Date, boolean, Integer, Hashtable, Integer, String)
 o 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.

Method Index

 o attribute(String)
Returns the defined attribute value for the specified type.
 o attributes()
Returns an enumeration of the attributes.
 o copy(Select)
Copies the specified selection information into this object.
 o equals(Object)
Compares this object to the specified object.
 o getAction()
Returns the action type specifier.
 o getAuthor()
Returns the action author's username, if known.
 o getCategories()
Returns the selection categories as a string with categories separated by spaces.
 o getCollabAuthor()
Returns the collaborative author's username, if known.
 o getDate()
Returns the reference date as a string.
 o getDay()
Gets the action day.
 o getHour()
Gets the action hour.
 o getMinute()
Gets the action minute.
 o getMonth()
Gets the action month.
 o getTime()
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by the reference date.
 o getYear()
Gets the action year.
 o hasAttributes()
Returns the number of attributes defined for this selection.
 o isNewer()
Returns whether the specified action on the selected documents is relatively newer or older than the reference date.
 o isNewer(Boolean)
Sets whether the specified action on the selected documents is relatively newer or older than the reference date.
 o removeAttribute(String)
Removes an attribute.
 o search(Integer)
Creates a data request to search for documents corresponding the specified project identifier and this selection information.
 o search(Integer, boolean)
Creates a data request to search for documents corresponding the specified project identifier and this selection information.
 o search(Integer, boolean, String, String)
Creates a data request to search for documents corresponding the specified project identifier and this selection information.
 o setAction(String)
Sets the action type specifier.
 o setAttribute(String)
Sets an attribute to allow any value.
 o setAttribute(String, String)
Sets an attribute.
 o setAuthor(String)
Sets the action author by username.
 o setByDays(float)
Sets the reference date in days before now.
 o setByHours(float)
Sets the reference date in hours before now.
 o setByMinutes(float)
Sets the reference date in minutes before now.
 o setByMonths(float)
Sets the reference date in months before now.
 o setByYears(float)
Sets the reference date in years before now.
 o setCategories(String)
Sets the selection categories.
 o setCollabAuthor(String)
Sets the collaborative author by username.
 o setCollabType(String)
Sets the collaborative author type.
 o setDate(int, int, int, int, int)
Sets the reference date.
 o setDate(String)
Sets the reference date.
 o setTime(long)
Sets the reference date to represent the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.

Variables

 o CREATION
 public static final String CREATION
A convenience constant to specify the action as a creation.

See Also:
action
 o MODIFICATION
 public static final String MODIFICATION
A convenience constant to specify the action as a modification.

See Also:
action
 o LAST_EDIT
 public static final String LAST_EDIT
A convenience constant to specify the action as the last edit.

See Also:
action
 o ANY_VALUE
 public static final String ANY_VALUE
A convenience constant to specify any attribute value.

See Also:
attributes
 o WRITER
 public static final String WRITER
A convenience constant to specify the collaborative author as a writer.

See Also:
type
 o READER
 public static final String READER
A convenience constant to specify the collaborative author as a reader.

See Also:
type
 o categories
 public Vector categories
This vector specifies the categories common to all documents.

 o action
 public String action
This variable specifies the document action for time comparison. A null value is identical to "creation".

 o date
 public Date date
This variable specifies the reference date for time comparison. A null value corresponds to "at the latest moment".

 o 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.

 o author
 public Integer author
This variable specifies the action author.

See Also:
action
 o 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
 o collabAuthor
 public Integer collabAuthor
This variable specifies the collaborative author.

 o 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
 o subprojects
 public boolean subprojects
This variable specifies whether subprojects should be included in the search. The default value false.

Constructors

 o Select
 Select(boolean subprojects,
        Vector categories,
        String action,
        Date date,
        boolean newer,
        Integer author,
        Hashtable attributes,
        Integer collabAuthor,
        String collabType)
 o Select
 public Select()
Allocates a Select object corresponding a search for all documents.

 o 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

Methods

 o getAction
 public String getAction()
Returns the action type specifier. This method is accessible from JavaScript.

Returns:
an action type
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o setAction
 public void setAction(String action)
Sets the action type specifier. This method is accessible from JavaScript.

Parameters:
action - an action type
 o 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.
 o getYear
 public int getYear()
Gets the action year. This method is accessible from JavaScript.

Returns:
the value of the YEAR time field
 o 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.
 o getDay
 public int getDay()
Gets the action day. This method is accessible from JavaScript.

Returns:
the value of the DAY_OF_MONTH time field
 o getHour
 public int getHour()
Gets the action hour. This method is accessible from JavaScript.

Returns:
the value of the HOUR_OF_DAY time field
 o getMinute
 public int getMinute()
Gets the action minute. This method is accessible from JavaScript.

Returns:
the value of the MINUTE time field
 o setDate
 public void setDate(String date)
Sets the reference date. This method is accessible from JavaScript.

Parameters:
date - a date string
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o setCollabType
 public void setCollabType(String type)
Sets the collaborative author type. This method is accessible from JavaScript.

Parameters:
type - a type
 o hasAttributes
 public int hasAttributes()
Returns the number of attributes defined for this selection.

Returns:
the number of attributes
 o attribute
 public String attribute(String type)
Returns the defined attribute value for the specified type.

Parameters:
type - the attribute ktype
Returns:
the attribute value
 o 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
 o 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
 o 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
 o 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
 o 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
 o copy
 public void copy(Select from)
Copies the specified selection information into this object.

Parameters:
from - the selection information to be copied
 o 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
 o 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
 o 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.