org.tigris.scarab.attribute
Class DateAttribute

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.BaseAttributeValue
          extended byorg.tigris.scarab.om.AttributeValue
              extended byorg.tigris.scarab.attribute.FreeFormAttribute
                  extended byorg.tigris.scarab.attribute.StringAttribute
                      extended byorg.tigris.scarab.attribute.DateAttribute
All Implemented Interfaces:
org.apache.torque.om.Persistent, org.apache.fulcrum.intake.Retrievable, java.io.Serializable

public class DateAttribute
extends StringAttribute

Version:
$Revision: 9902 $ $Date: 2005-10-25 22:54:19 +0200 (Di, 25 Okt 2005) $
Author:
Fedor
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
DateAttribute()
           
 
Method Summary
static void convertDateAttributes(java.util.Collection attributeValues, java.lang.String mask)
          Utility method that will convert every DateAttribute in a list from the user's locale format to the internal (yyyyMMddHHmmssSS) format.
static java.lang.String dateFormat(java.lang.String value, java.lang.String mask)
          Receives the value in yyyyMMddHHmmssSS format and returns it formatted according to the mask parameter.
static java.lang.String internalDateFormat(java.lang.String value, java.lang.String mask)
          Receives the value in the format defined by 'mask' and returns it formatted in internal (yyyyMMddHHmmssSS) format.
 
Methods inherited from class org.tigris.scarab.attribute.StringAttribute
save
 
Methods inherited from class org.tigris.scarab.attribute.FreeFormAttribute
init, loadResources, setResources
 
Methods inherited from class org.tigris.scarab.om.AttributeValue
copy, equals, getActivity, getAttributeOption, getChainedValue, getNewInstance, getNewInstance, getNewInstance, getOptionIdAsString, getOptionIds, getQueryKey, getRModuleAttribute, getUserIds, getValueList, hashCode, isQuickSearchAttribute, isRequired, isSet, setActivity, setActivityDescription, setAttributeId, setChainedValue, setIssueId, setNumericValue, setOptionId, setOptionIdOnly, setOptionIds, setProperties, setUserId, setUserIdOnly, setUserIds, setValue, setValueOnly, startActivitySet, supportsVoting, toString
 
Methods inherited from class org.tigris.scarab.om.BaseAttributeValue
copyInto, getAttribute, getAttribute, getAttributeId, getAttributeOption, getByName, getByPeerName, getByPosition, getDeleted, getFieldNames, getIssue, getIssue, getIssueId, getNumericValue, getOptionId, getPeer, getPrimaryKey, getScarabUser, getScarabUser, getUserId, getValue, getValueId, isCacheOnSave, save, save, setAttribute, setAttributeKey, setAttributeOption, setAttributeOptionKey, setDeleted, setIssue, setIssueKey, setPrimaryKey, setPrimaryKey, setQueryKey, setScarabUser, setScarabUserKey, setValueId
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, getLog, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Constructor Detail

DateAttribute

public DateAttribute()
Method Detail

dateFormat

public static java.lang.String dateFormat(java.lang.String value,
                                          java.lang.String mask)
Receives the value in yyyyMMddHHmmssSS format and returns it formatted according to the mask parameter. If the value is not parseable, it will be returned unchanged.

Parameters:
value -
mask -
Returns:

internalDateFormat

public static java.lang.String internalDateFormat(java.lang.String value,
                                                  java.lang.String mask)
Receives the value in the format defined by 'mask' and returns it formatted in internal (yyyyMMddHHmmssSS) format. If the value is not parseable, it will be returned unchanged.

Parameters:
value -
mask -
Returns:

convertDateAttributes

public static void convertDateAttributes(java.util.Collection attributeValues,
                                         java.lang.String mask)
                                  throws org.apache.torque.TorqueException
Utility method that will convert every DateAttribute in a list from the user's locale format to the internal (yyyyMMddHHmmssSS) format.

Parameters:
mask -
Throws:
org.apache.torque.TorqueException


Copyright © 2000-2004 Tigris.org. All Rights Reserved.