org.datanucleus.properties
Class BooleanPropertyValidator

java.lang.Object
  extended by org.datanucleus.properties.BooleanPropertyValidator
All Implemented Interfaces:
PersistencePropertyValidator

public class BooleanPropertyValidator
extends java.lang.Object
implements PersistencePropertyValidator

Validator for a property that represents a boolean.


Constructor Summary
BooleanPropertyValidator()
           
 
Method Summary
 boolean validate(java.lang.String name, java.lang.Object value)
          Method to validate the property, allowing only Boolean or String(with boolean values).
static boolean validateValueIsBoolean(java.lang.Object value)
          Convenience method that checks that the passed value is usable as a boolean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanPropertyValidator

public BooleanPropertyValidator()
Method Detail

validate

public boolean validate(java.lang.String name,
                        java.lang.Object value)
Method to validate the property, allowing only Boolean or String(with boolean values).

Specified by:
validate in interface PersistencePropertyValidator
Parameters:
name - Name of property
value - Value of property
Returns:
Whether it is valid

validateValueIsBoolean

public static boolean validateValueIsBoolean(java.lang.Object value)
Convenience method that checks that the passed value is usable as a boolean.

Parameters:
value - The value
Returns:
Whether it is boolean


Copyright © 2010. All Rights Reserved.