com.metamatrix.common.object
Class StandardPropertyTypeValidator

java.lang.Object
  extended by com.metamatrix.common.object.StandardPropertyTypeValidator
All Implemented Interfaces:
java.io.Serializable

public final class StandardPropertyTypeValidator
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.util.Map STANDARD_VALIDATORS
           
 
Constructor Summary
StandardPropertyTypeValidator()
           
 
Method Summary
static boolean isValidValue(java.lang.Object[] values, PropertyTypeValidator validator)
          This helper method will be used to evaluate any PropertyValues that have a multiplicity of * or be able to have more than one value.
static PropertyTypeValidator lookup(java.lang.String typeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_VALIDATORS

public static final java.util.Map STANDARD_VALIDATORS
Constructor Detail

StandardPropertyTypeValidator

public StandardPropertyTypeValidator()
Method Detail

lookup

public static PropertyTypeValidator lookup(java.lang.String typeName)

isValidValue

public static boolean isValidValue(java.lang.Object[] values,
                                   PropertyTypeValidator validator)
This helper method will be used to evaluate any PropertyValues that have a multiplicity of * or be able to have more than one value. We use object arrays because if we used some sort of Collection we would not be able to tell if the Collection was the value or the Collection was the Collection of values for that property as there is a property type of List.

Parameters:
values - the object array of values to be validated
the - validator instance to use to validate the values in the array
Returns:
true if the value is valid for the property type.


Copyright © 2009. All Rights Reserved.