Project Wonder 2.0

com.gammastream.validity
Class GSVOtherMethods

java.lang.Object
  extended bycom.gammastream.validity.GSVOtherMethods

public class GSVOtherMethods
extends Object

This class provides a set of predefined rules for performing validation on miscellaneous data types. These rules are part of the default set of 'QuickRules'.

Author:
GammaStream Technologies, Inc.

Constructor Summary
GSVOtherMethods()
           
 
Method Summary
static boolean isArrayEmpty(Object object, Object attribute, String key, NSDictionary params)
          Determines whether the specified to-many relationship contains any objects.
static boolean isNull(Object object, Object attribute, String key, NSDictionary params)
          Determines whether a value has been provided for the specified attribute.
static boolean isUnique(Object object, Object attribute, String key, NSDictionary params)
          Verifies that the specified attribute is unique.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GSVOtherMethods

public GSVOtherMethods()
Method Detail

isNull

public static final boolean isNull(Object object,
                                   Object attribute,
                                   String key,
                                   NSDictionary params)
Determines whether a value has been provided for the specified attribute.

Parameters:
object - The object whose attribute is being validated.
attribute - The attribute being validated.
key - The key used to access the attribute.
params - The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the value is null; otherwise, false

isArrayEmpty

public static final boolean isArrayEmpty(Object object,
                                         Object attribute,
                                         String key,
                                         NSDictionary params)
Determines whether the specified to-many relationship contains any objects.

The required key-value pairs include:
"RelationshipKey" = The relationship key. (i.e. "toUsers" )

Parameters:
object - The object whose attribute is being validated.
attribute - The attribute being validated.
key - The key used to access the attribute.
params - The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the to-many array is empty; otherwise, false

isUnique

public static final boolean isUnique(Object object,
                                     Object attribute,
                                     String key,
                                     NSDictionary params)
Verifies that the specified attribute is unique.

Parameters:
object - The object whose attribute is being validated.
attribute - The attribute being validated.
key - The key used to access the attribute.
params - The param dictionary which must contain the above mentioned key-value pairs.
Returns:
true if the attribute is empty; otherwise, false

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.