sbDatetimePropertyInfo Class Reference

#include <sbDatetimePropertyInfo.h>

Inheritance diagram for sbDatetimePropertyInfo:
[legend]
Collaboration diagram for sbDatetimePropertyInfo:
[legend]

Public Member Functions

NS_DECL_ISUPPORTS NS_IMETHOD GetOPERATOR_EQUALS (nsAString &aOPERATOR_EQUALS)
 
NS_IMETHOD GetOPERATOR_NOTEQUALS (nsAString &aOPERATOR_NOTEQUALS)
 
NS_IMETHOD GetOPERATOR_GREATER (nsAString &aOPERATOR_GREATER)
 
NS_IMETHOD GetOPERATOR_GREATEREQUAL (nsAString &aOPERATOR_GREATEREQUAL)
 
NS_IMETHOD GetOPERATOR_LESS (nsAString &aOPERATOR_LESS)
 
NS_IMETHOD GetOPERATOR_LESSEQUAL (nsAString &aOPERATOR_LESSEQUAL)
 
NS_IMETHOD GetOPERATOR_CONTAINS (nsAString &aOPERATOR_CONTAINS)
 
NS_IMETHOD GetOPERATOR_NOTCONTAINS (nsAString &aOPERATOR_NOTCONTAINS)
 
NS_IMETHOD GetOPERATOR_BEGINSWITH (nsAString &aOPERATOR_BEGINSWITH)
 
NS_IMETHOD GetOPERATOR_NOTBEGINSWITH (nsAString &aOPERATOR_NOTBEGINSWITH)
 
NS_IMETHOD GetOPERATOR_ENDSWITH (nsAString &aOPERATOR_ENDSWITH)
 
NS_IMETHOD GetOPERATOR_NOTENDSWITH (nsAString &aOPERATOR_NOTENDSWITH)
 
NS_IMETHOD GetOPERATOR_BETWEEN (nsAString &aOPERATOR_BETWEEN)
 
NS_IMETHOD GetOPERATOR_ISSET (nsAString &aOPERATOR_ISSET)
 
NS_IMETHOD GetOPERATOR_ISNOTSET (nsAString &aOPERATOR_ISNOTSET)
 
NS_IMETHOD GetNullSort (PRUint32 *aNullSort)
 
NS_IMETHOD SetNullSort (PRUint32 aNullSort)
 
NS_IMETHOD GetSecondarySort (sbIPropertyArray **aSecondarySort)
 
NS_IMETHOD SetSecondarySort (sbIPropertyArray *aSecondarySort)
 
NS_IMETHOD GetId (nsAString &aID)
 
NS_IMETHOD SetId (const nsAString &aID)
 
NS_IMETHOD GetType (nsAString &aType)
 
NS_IMETHOD SetType (const nsAString &aType)
 
NS_IMETHOD GetDisplayName (nsAString &aDisplayName)
 
NS_IMETHOD SetDisplayName (const nsAString &aDisplayName)
 
NS_IMETHOD GetLocalizationKey (nsAString &aLocalizationKey)
 
NS_IMETHOD SetLocalizationKey (const nsAString &aLocalizationKey)
 
NS_IMETHOD GetUserViewable (PRBool *aUserViewable)
 
NS_IMETHOD SetUserViewable (PRBool aUserViewable)
 
NS_IMETHOD GetUserEditable (PRBool *aUserEditable)
 
NS_IMETHOD SetUserEditable (PRBool aUserEditable)
 
NS_IMETHOD GetRemoteReadable (PRBool *aRemoteReadable)
 
NS_IMETHOD SetRemoteReadable (PRBool aRemoteReadable)
 
NS_IMETHOD GetRemoteWritable (PRBool *aRemoteWritable)
 
NS_IMETHOD SetRemoteWritable (PRBool aRemoteWritable)
 
NS_IMETHOD GetOperators (nsISimpleEnumerator **aOperators)
 
NS_IMETHOD SetOperators (nsISimpleEnumerator *aOperators)
 
NS_IMETHOD GetOperator (const nsAString &aOperator, sbIPropertyOperator **_retval)
 
NS_IMETHOD SetUnitConverter (sbIPropertyUnitConverter *aUnitConverter)
 
NS_IMETHOD GetUnitConverter (sbIPropertyUnitConverter **retVal)
 
NS_IMETHOD GetUsedInIdentity (PRBool *aUsedInIdentity)
 
NS_IMETHOD SetUsedInIdentity (PRBool aUsedInIdentity)
 
NS_IMETHOD MakeSortable (const nsAString &aValue, nsAString &retVal)
 
NS_DECL_SBIDATETIMEPROPERTYINFO sbDatetimePropertyInfo ()
 
virtual ~sbDatetimePropertyInfo ()
 
nsresult Init ()
 
NS_IMETHOD Validate (const nsAString &aValue, PRBool *_retval)
 
NS_IMETHOD Sanitize (const nsAString &aValue, nsAString &_retval)
 
NS_IMETHOD Format (const nsAString &aValue, nsAString &_retval)
 
NS_IMETHOD MakeSearchable (const nsAString &aValue, nsAString &_retval)
 
- Public Member Functions inherited from sbPropertyInfo
NS_DECL_ISUPPORTS
NS_DECL_SBIPROPERTYINFO 
sbPropertyInfo ()
 
virtual ~sbPropertyInfo ()
 
NS_IMETHOD SetUnitConverter (sbIPropertyUnitConverter *aUnitConverter)
 
nsresult Init ()
 
- Public Member Functions inherited from sbIPropertyInfo
sbIPropertyOperator getOperator (in AString aOperator)
 Get the sbIPropertyOperator for the given operator string. More...
 
boolean validate (in AString aValue)
 Validates the string for this property type. More...
 
AString sanitize (in AString aValue)
 Sanitize a value so that it passes validation. More...
 
AString format (in AString aValue)
 Formats the value for display. More...
 
AString makeSortable (in AString aValue)
 Transforms the string into its sortable collation data equivalent. More...
 
AString makeSearchable (in AString aValue)
 Formats the value to enable proper search. More...
 
- Public Member Functions inherited from sbSupportsWeakReference
 sbSupportsWeakReference ()
 

Protected Member Functions

nsresult InitializeOperators ()
 
- Protected Member Functions inherited from sbSupportsWeakReference
 ~sbSupportsWeakReference ()
 
void ClearWeakReferences ()
 
PRBool HasWeakReferences () const
 

Protected Attributes

PRLock * mTimeTypeLock
 
PRInt32 mTimeType
 
PRLock * mMinMaxDateTimeLock
 
PRInt64 mMinDateTime
 
PRInt64 mMaxDateTime
 
PRLock * mAppLocaleLock
 
nsCOMPtr< nsILocale > mAppLocale
 
nsCOMPtr
< sbIPropertyUnitConverter
mUnitConverter
 
PRLock * mDateTimeFormatLock
 
nsCOMPtr< nsIDateTimeFormat > mDateTimeFormat
 
- Protected Attributes inherited from sbPropertyInfo
PRUint32 mNullSort
 
PRLock * mSecondarySortLock
 
nsCOMPtr< sbIPropertyArraymSecondarySort
 
PRLock * mIDLock
 
nsString mID
 
PRLock * mTypeLock
 
nsString mType
 
PRLock * mDisplayNameLock
 
nsString mDisplayName
 
PRLock * mLocalizationKeyLock
 
nsString mLocalizationKey
 
PRLock * mUserViewableLock
 
PRBool mUserViewable
 
PRLock * mUserEditableLock
 
PRBool mUserEditable
 
PRLock * mOperatorsLock
 
nsCOMArray< sbIPropertyOperatormOperators
 
PRLock * mRemoteReadableLock
 
PRBool mRemoteReadable
 
PRLock * mRemoteWritableLock
 
PRBool mRemoteWritable
 
PRLock * mUnitConverterLock
 
nsCOMPtr
< sbIPropertyUnitConverter
mUnitConverter
 
PRLock * mUsedInIdentityLock
 
PRBool mUsedInIdentity
 

Additional Inherited Members

- Public Attributes inherited from sbIPropertyInfo
readonly attribute AString OPERATOR_EQUALS
 
readonly attribute AString OPERATOR_NOTEQUALS
 
readonly attribute AString OPERATOR_GREATER
 
readonly attribute AString OPERATOR_GREATEREQUAL
 
readonly attribute AString OPERATOR_LESS
 
readonly attribute AString OPERATOR_LESSEQUAL
 
readonly attribute AString OPERATOR_CONTAINS
 
readonly attribute AString OPERATOR_NOTCONTAINS
 
readonly attribute AString OPERATOR_BEGINSWITH
 
readonly attribute AString OPERATOR_NOTBEGINSWITH
 
readonly attribute AString OPERATOR_ENDSWITH
 
readonly attribute AString OPERATOR_NOTENDSWITH
 
readonly attribute AString OPERATOR_BETWEEN
 
readonly attribute AString OPERATOR_ISSET
 
readonly attribute AString OPERATOR_ISNOTSET
 
const unsigned long SORT_NULL_SMALL = 0
 Causes null values to be infinitely small. This is the default. More...
 
const unsigned long SORT_NULL_BIG = 1
 Causes null values to be infinitely large. More...
 
const unsigned long SORT_NULL_FIRST = 2
 Null values always first. More...
 
const unsigned long SORT_NULL_LAST = 3
 Null values always last. More...
 
attribute unsigned long nullSort
 Set where NULL values get sorted to. More...
 
attribute sbIPropertyArray secondarySort
 When sorting by this property, additionally sort by the following properties. More...
 
attribute AString id
 Unique ID for this property. More...
 
attribute AString type
 The type property. More...
 
attribute AString displayName
 Localized display name of this property. More...
 
attribute AString localizationKey
 Key used to find related localization strings. More...
 
attribute boolean userViewable
 A user may view this property. This does not impede reading the value, it's merely meant as a guideline. More...
 
attribute boolean userEditable
 A user may edit this property. This does not impede editing the value, it's merely meant as a guideline. More...
 
attribute boolean remoteReadable
 A web site may read the value of this property. More...
 
attribute boolean remoteWritable
 A web site may write the value of this property. More...
 
attribute boolean usedInIdentity
 This attribute indicates that changing this property may change the computed hash for the item. If a property with usedInIdentity of true is changed, the identity is recalculated. More...
 
attribute nsISimpleEnumerator operators
 True if this property has a selection list. More...
 
readonly attribute
sbIPropertyUnitConverter 
unitConverter
 A unit converter to convert to and from the units in which the property can be expressed. More...
 
- Public Attributes inherited from sbIDatetimePropertyInfo
readonly attribute AString OPERATOR_INTHELAST
 
readonly attribute AString OPERATOR_NOTINTHELAST
 
readonly attribute AString OPERATOR_ONDATE
 
readonly attribute AString OPERATOR_NOTONDATE
 
readonly attribute AString OPERATOR_BEFOREDATE
 
readonly attribute AString OPERATOR_BEFOREORONDATE
 
readonly attribute AString OPERATOR_AFTERDATE
 
readonly attribute AString OPERATOR_AFTERORONDATE
 
readonly attribute AString OPERATOR_BETWEENDATES
 
const long TIMETYPE_UNINITIALIZED = -1
 
const long TIMETYPE_DATE = 0
 2007-03-28 , in localized format More...
 
const long TIMETYPE_TIME = 1
 HH:mm:ss.ms, in localized format. Limited to 24 hour days. More...
 
const long TIMETYPE_DATETIME = 2
 Long date format, 2007-03-28 12:33:01 , no milliseconds. More...
 
const long TIMETYPE_TIMESTAMP = 4
 Timestamp format, respects unix time, microsecond format. More...
 
attribute long timeType
 You must initialize this attribute before using this object. If you do not, all methods on this object will return NS_ERROR_NOT_INITIALIZED. More...
 
attribute long long minDateTime
 A minimum datetime value to enforce when validating. If you do not wish to use this, set it to 0. More...
 
attribute long long maxDateTime
 A maximum datetime value to enforce when validating. If you do not wish to use this, set it to 0. More...
 

Detailed Description

Definition at line 42 of file sbDatetimePropertyInfo.h.

Constructor & Destructor Documentation

NS_INTERFACE_TABLE_BEGIN NS_INTERFACE_TABLE_END sbDatetimePropertyInfo::sbDatetimePropertyInfo ( )

Definition at line 52 of file sbDatetimePropertyInfo.cpp.

sbDatetimePropertyInfo::~sbDatetimePropertyInfo ( )
virtual

Definition at line 80 of file sbDatetimePropertyInfo.cpp.

Member Function Documentation

NS_IMETHODIMP sbDatetimePropertyInfo::Format ( const nsAString &  aValue,
nsAString &  _retval 
)

Definition at line 258 of file sbDatetimePropertyInfo.cpp.

NS_IMETHOD sbDatetimePropertyInfo::GetDisplayName ( nsAString &  aDisplayName)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetId ( nsAString &  aID)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetLocalizationKey ( nsAString &  aLocalizationKey)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetNullSort ( PRUint32 *  aNullSort)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOperator ( const nsAString &  aOperator,
sbIPropertyOperator **  _retval 
)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_BEGINSWITH ( nsAString &  aOPERATOR_BEGINSWITH)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_BETWEEN ( nsAString &  aOPERATOR_BETWEEN)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_CONTAINS ( nsAString &  aOPERATOR_CONTAINS)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_ENDSWITH ( nsAString &  aOPERATOR_ENDSWITH)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_DECL_ISUPPORTS NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_EQUALS ( nsAString &  aOPERATOR_EQUALS)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_GREATER ( nsAString &  aOPERATOR_GREATER)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_GREATEREQUAL ( nsAString &  aOPERATOR_GREATEREQUAL)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_ISNOTSET ( nsAString &  aOPERATOR_ISNOTSET)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_ISSET ( nsAString &  aOPERATOR_ISSET)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_LESS ( nsAString &  aOPERATOR_LESS)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_LESSEQUAL ( nsAString &  aOPERATOR_LESSEQUAL)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_NOTBEGINSWITH ( nsAString &  aOPERATOR_NOTBEGINSWITH)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_NOTCONTAINS ( nsAString &  aOPERATOR_NOTCONTAINS)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_NOTENDSWITH ( nsAString &  aOPERATOR_NOTENDSWITH)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOPERATOR_NOTEQUALS ( nsAString &  aOPERATOR_NOTEQUALS)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetOperators ( nsISimpleEnumerator **  aOperators)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetRemoteReadable ( PRBool *  aRemoteReadable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetRemoteWritable ( PRBool *  aRemoteWritable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetSecondarySort ( sbIPropertyArray **  aSecondarySort)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetType ( nsAString &  aType)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetUnitConverter ( sbIPropertyUnitConverter **  retVal)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetUsedInIdentity ( PRBool *  aUsedInIdentity)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetUserEditable ( PRBool *  aUserEditable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::GetUserViewable ( PRBool *  aUserViewable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

nsresult sbDatetimePropertyInfo::Init ( )

Definition at line 97 of file sbDatetimePropertyInfo.cpp.

Here is the call graph for this function:

nsresult sbDatetimePropertyInfo::InitializeOperators ( )
protected

Definition at line 110 of file sbDatetimePropertyInfo.cpp.

Here is the caller graph for this function:

NS_IMETHODIMP sbDatetimePropertyInfo::MakeSearchable ( const nsAString &  aValue,
nsAString &  _retval 
)

Definition at line 349 of file sbDatetimePropertyInfo.cpp.

NS_IMETHOD sbDatetimePropertyInfo::MakeSortable ( const nsAString &  aValue,
nsAString &  retVal 
)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHODIMP sbDatetimePropertyInfo::Sanitize ( const nsAString &  aValue,
nsAString &  _retval 
)

Definition at line 253 of file sbDatetimePropertyInfo.cpp.

NS_IMETHOD sbDatetimePropertyInfo::SetDisplayName ( const nsAString &  aDisplayName)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetId ( const nsAString &  aID)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetLocalizationKey ( const nsAString &  aLocalizationKey)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetNullSort ( PRUint32  aNullSort)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetOperators ( nsISimpleEnumerator aOperators)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetRemoteReadable ( PRBool  aRemoteReadable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetRemoteWritable ( PRBool  aRemoteWritable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetSecondarySort ( sbIPropertyArray aSecondarySort)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetType ( const nsAString &  aType)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetUnitConverter ( sbIPropertyUnitConverter aUnitConverter)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetUsedInIdentity ( PRBool  aUsedInIdentity)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetUserEditable ( PRBool  aUserEditable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHOD sbDatetimePropertyInfo::SetUserViewable ( PRBool  aUserViewable)
inline

Definition at line 48 of file sbDatetimePropertyInfo.h.

NS_IMETHODIMP sbDatetimePropertyInfo::Validate ( const nsAString &  aValue,
PRBool *  _retval 
)

Definition at line 231 of file sbDatetimePropertyInfo.cpp.

Member Data Documentation

nsCOMPtr<nsILocale> sbDatetimePropertyInfo::mAppLocale
protected

Definition at line 72 of file sbDatetimePropertyInfo.h.

PRLock* sbDatetimePropertyInfo::mAppLocaleLock
protected

Definition at line 71 of file sbDatetimePropertyInfo.h.

nsCOMPtr<nsIDateTimeFormat> sbDatetimePropertyInfo::mDateTimeFormat
protected

Definition at line 77 of file sbDatetimePropertyInfo.h.

PRLock* sbDatetimePropertyInfo::mDateTimeFormatLock
protected

Definition at line 76 of file sbDatetimePropertyInfo.h.

PRInt64 sbDatetimePropertyInfo::mMaxDateTime
protected

Definition at line 69 of file sbDatetimePropertyInfo.h.

PRInt64 sbDatetimePropertyInfo::mMinDateTime
protected

Definition at line 68 of file sbDatetimePropertyInfo.h.

PRLock* sbDatetimePropertyInfo::mMinMaxDateTimeLock
protected

Definition at line 67 of file sbDatetimePropertyInfo.h.

PRInt32 sbDatetimePropertyInfo::mTimeType
protected

Definition at line 65 of file sbDatetimePropertyInfo.h.

PRLock* sbDatetimePropertyInfo::mTimeTypeLock
protected

Definition at line 64 of file sbDatetimePropertyInfo.h.

nsCOMPtr<sbIPropertyUnitConverter> sbDatetimePropertyInfo::mUnitConverter
protected

Definition at line 74 of file sbDatetimePropertyInfo.h.


The documentation for this class was generated from the following files: