com.starteam
Class DateProperty

java.lang.Object
  extended by com.starteam.Property
      extended by com.starteam.ScalarProperty
          extended by com.starteam.DateProperty
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Sprint.Type.EndDateProperty, Sprint.Type.StartDateProperty, Task.Type.ActualFinishProperty, Task.Type.ActualStartProperty, Task.Type.EstimatedFinishProperty, Task.Type.EstimatedStartProperty, WorkRecord.Type.WorkedOnProperty

public class DateProperty
extends ScalarProperty

This class represents a property whose value is a java.util.Date.


Nested Class Summary
static class DateProperty.WebCacheDateProperty
          Base accessor for cached SDK objects encapsulating the statefulness of objects obtained from the artifact cache.
 
Nested classes/interfaces inherited from class com.starteam.ScalarProperty
ScalarProperty.WebCacheScalarProperty
 
Nested classes/interfaces inherited from class com.starteam.Property
Property.MetaData, Property.WebCacheProperty
 
Field Summary
static Date MAX_VALUE
          he constant December 31, 9999
static Date MIN_VALUE
          The constant January 01, 1900
static Date VALUE_NOT_SET
          When used as the value of a DateProperty, indicates that the value has not been set.
 
Method Summary
 Date getDefaultValue()
          Returns the default Date value for this Property
 java.lang.String getDisplayValue(java.lang.Object value)
          Converts the given property value to a string suitable for display.
 java.lang.Object getGenericMaxValue()
          Gets the maximum allowable value of this property.
 java.lang.Object getGenericMinValue()
          Gets the minimum allowable value of this property.
 Date getMaxValue()
          Returns the maximum Date value for this Property or MIN_VALUE if none has been specified
 Date getMinValue()
          Returns the minimum Date value for this Property or MIN_VALUE if none has been specified
 boolean isQueryRelationSupported(QueryPart.Relation operator)
          Returns true if this property supports the specified query operator
 boolean isSortByTextValueSupported()
          Returns true if this property supports GroupInfo.SortbyTextValue for the specified Query Operator
 QueryPart newQueryPart(QueryPart.Relation relation, Date value)
          Creates a new query expression that tests this property against a DateTime value.
 QueryPart newQueryPart(QueryPart.Relation relation, TimeSpan value)
          Returns a new QueryPart that tests this property against the given value using the given query relation
 void setDefaultValue(Date value)
          Sets the default Date value for this Property
 void setMaxValue(Date value)
          Sets the maximum Date value for this Property
 void setMinValue(Date value)
          Sets the minimum Date value for this Property
 
Methods inherited from class com.starteam.ScalarProperty
setGenericMaxValue, setGenericMinValue
 
Methods inherited from class com.starteam.Property
areValuesEqual, copy, equals, getDebugString, getDependentProperties, getDisplayName, getDisplayNameTranslations, getGenericDefaultValue, getID, getName, getServer, getType, hashCode, isAdvanced, isCalculated, isClientCalculated, isDescriptor, isDirty, isDisabled, isEnabled, isEqualTo, isGenericCalculated, isHeader, isItemProperty, isLegalValue, isNew, isPrimaryDescriptor, isRequired, isRestricted, isRevisionIndependent, isServerCalculated, isStored, isSysDefined, isUserCustomized, isUserDefined, isUserModifiable, isViewSpecific, resolveAllDependencies, setDescriptor, setDisplayName, setDisplayNameTranslations, setEnabled, setGenericDefaultValue, setPrimaryDescriptor, setRequired, toString, toXml, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_NOT_SET

public static final Date VALUE_NOT_SET
When used as the value of a DateProperty, indicates that the value has not been set.


MIN_VALUE

public static final Date MIN_VALUE
The constant January 01, 1900


MAX_VALUE

public static final Date MAX_VALUE
he constant December 31, 9999

Method Detail

getDisplayValue

public java.lang.String getDisplayValue(java.lang.Object value)
Converts the given property value to a string suitable for display.

Specified by:
getDisplayValue in class Property
Parameters:
value - A legal value for this property.
Returns:
A string representation of the value

getDefaultValue

public Date getDefaultValue()
Returns the default Date value for this Property

Returns:
the default Date value for this Property

setDefaultValue

public void setDefaultValue(Date value)
Sets the default Date value for this Property

Parameters:
value - the default Date value for this Property

getMinValue

public Date getMinValue()
Returns the minimum Date value for this Property or MIN_VALUE if none has been specified

Returns:
the minimum Date value for this Property

setMinValue

public void setMinValue(Date value)
Sets the minimum Date value for this Property

Parameters:
value - the minimum Date value for this Property

getMaxValue

public Date getMaxValue()
Returns the maximum Date value for this Property or MIN_VALUE if none has been specified

Returns:
the maximum Date value for this Property

setMaxValue

public void setMaxValue(Date value)
Sets the maximum Date value for this Property

Parameters:
value - the maximum Date value for this Property

getGenericMinValue

public java.lang.Object getGenericMinValue()
Gets the minimum allowable value of this property.

Overrides:
getGenericMinValue in class ScalarProperty
Returns:
The minimum allowable value of this property.
See Also:
IntegerProperty.getMinValue(), DoubleProperty.getMinValue(), DateProperty.getMinValue(), DateTimeProperty.getMinValue(), LongIntegerProperty.getMinValue(), TimeSpanProperty.getMinValue()

getGenericMaxValue

public java.lang.Object getGenericMaxValue()
Gets the maximum allowable value of this property.

Overrides:
getGenericMaxValue in class ScalarProperty
Returns:
The maximum allowable value of this property.
See Also:
IntegerProperty.getMaxValue(), DoubleProperty.getMaxValue(), DateProperty.getMaxValue(), DateTimeProperty.getMaxValue(), LongIntegerProperty.getMaxValue(), TimeSpanProperty.getMaxValue()

isQueryRelationSupported

public boolean isQueryRelationSupported(QueryPart.Relation operator)
Returns true if this property supports the specified query operator

Overrides:
isQueryRelationSupported in class Property
Parameters:
operator - the query operator
Returns:
true if this property supports the specified query operator

isSortByTextValueSupported

public boolean isSortByTextValueSupported()
Returns true if this property supports GroupInfo.SortbyTextValue for the specified Query Operator

Overrides:
isSortByTextValueSupported in class Property
Returns:
true

newQueryPart

public QueryPart newQueryPart(QueryPart.Relation relation,
                              Date value)
Creates a new query expression that tests this property against a DateTime value.

Parameters:
relation - The query relation.
value - The Date value to be tested.
Returns:
A new query expression.
See Also:
QueryPart.Relation.LESS_THAN, QueryPart.Relation.LESS_THAN_OR_EQUAL_TO, QueryPart.Relation.EQUAL_TO, QueryPart.Relation.GREATER_THAN_OR_EQUAL_TO, QueryPart.Relation.GREATER_THAN, QueryPart.Relation.NOT_EQUAL_TO

newQueryPart

public QueryPart newQueryPart(QueryPart.Relation relation,
                              TimeSpan value)
Returns a new QueryPart that tests this property against the given value using the given query relation

Parameters:
relation - The query relation.
value - The TimeSpan value to be tested.
Returns:
A new query expression.
See Also:
QueryPart.Relation.DATE_WITHIN_LAST_DAYS, QueryPart.Relation.DATE_WITHIN_LAST_WEEKS, QueryPart.Relation.DATE_OLDER_THAN_DAYS, QueryPart.Relation.DATE_OLDER_THAN_WEEKS


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.