Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/gammastream/validity/GSVDateMethods.java


1   //
2   // GSVDateMethods.java
3   // Project Validity
4   //
5   // Created by admin on Sun Nov 25 2001
6   //
7   package com.gammastream.validity;
8   
9   import com.webobjects.foundation.*;
10  import com.webobjects.appserver.*;
11  import com.webobjects.eocontrol.*;
12  import com.webobjects.eoaccess.*;
13  
14  /**
15   *  This class provides a set of predefined rules for performing
16   *  validation on <code>NSTimestamps</code>. These rules are part of
17   *  the default set of 'QuickRules'.
18   * 
19   *  @author GammaStream Technologies, Inc.
20   */
21  public class GSVDateMethods extends Object {
22  
23      /**
24       *  One of the many 'mutators' which never fail, unless of course, an exception is thrown.
25       *  <br>A mutator simply modifies (or mutates) the attribute is some way.
26       *  <br>In this case, it updates the attribute to the current time.
27       *
28       *  @param  object    The object whose attribute is being validated.
29       *  @param  attribute   The attribute being validated.
30       *  @param  key     The key used to access the attribute.
31       *  @param  params     The param dictionary which must contain the above mentioned key-value pairs.
32       *
33       *  @return  always <code>true</code>
34       */
35      public final static boolean updateTimestamp(Object object, Object attribute, String key, NSDictionary params){
36          NSKeyValueCoding.Utility.takeValueForKey(object, new NSTimestamp(), key);
37          return true;
38      }
39      
40  
41  }