Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.server
Class JboPrecisionScaleValidator

java.lang.Object
  extended by oracle.jbo.server.JboPrecisionScaleValidator
All Implemented Interfaces:
JbiValidator, VetoableChangeListener

public class JboPrecisionScaleValidator
extends java.lang.Object
implements JbiValidator

Implements precision and scale validation for numeric attributes and length validation for string and character attributes. The framework applies this validator to Entity Object attributes whose definitions inlcude XML metadata precision or scale values.

This validator is invoked by an Entity Objects's validate() method when an attribute with defined precision or scale is modified.


Field Summary
static int DEFAULT_SCALE
           
 
Constructor Summary
JboPrecisionScaleValidator()
           
 
Method Summary
 java.lang.String getDescription()
          Gets the text description of this validator.
 int getPrecision()
           
 int getScale()
           
 void setDescription(java.lang.String description)
          Sets the text description of this validator.
 void setPrecision(int value)
           
 void setScale(int value)
           
 java.lang.String toString()
           
 boolean validateValue(java.lang.Object value)
          Tests the validity of an attribute value.
 void vetoableChange(PropertyChangeEvent p0)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SCALE

public static final int DEFAULT_SCALE
See Also:
Constant Field Values
Constructor Detail

JboPrecisionScaleValidator

public JboPrecisionScaleValidator()
Method Detail

getPrecision

public int getPrecision()

setPrecision

public void setPrecision(int value)

getScale

public int getScale()

setScale

public void setScale(int value)

getDescription

public java.lang.String getDescription()
Description copied from interface: JbiValidator
Gets the text description of this validator.

Specified by:
getDescription in interface JbiValidator
Returns:
a textual description.

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: JbiValidator
Sets the text description of this validator.

Specified by:
setDescription in interface JbiValidator
Parameters:
description - a textual description.

validateValue

public boolean validateValue(java.lang.Object value)
Description copied from interface: JbiValidator
Tests the validity of an attribute value.

Specified by:
validateValue in interface JbiValidator
Parameters:
value - a value.
Returns:
true if the value is valid.

vetoableChange

public void vetoableChange(PropertyChangeEvent p0)
                    throws AdfNmcException
Specified by:
vetoableChange in interface VetoableChangeListener
Throws:
AdfNmcException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.