Examples of NumberSubTypeConstraint


Examples of com.volantis.shared.metadata.type.constraint.NumberSubTypeConstraint

        // Reset the object
        numberType2 = createNumberTypeForTestingEquals();

        // Now test changing the number sub type constraint make the objects and their
        // hashcodes not equal
        NumberSubTypeConstraint numberSubTypeConstraint = MetaDataFactory.
                getDefaultInstance().
                getTypeFactory().getConstraintFactory().
                getNumberSubTypeConstraint(Integer.class);

        numberType2.setNumberSubTypeConstraint(numberSubTypeConstraint);
View Full Code Here

Examples of com.volantis.shared.metadata.type.constraint.NumberSubTypeConstraint

        ConstraintFactory constraintFactory = MetaDataFactory.getDefaultInstance().
                getTypeFactory().getConstraintFactory();

        // Set the number sub type on this object to Double
        NumberSubTypeConstraint numberSubTypeConstraint = constraintFactory.
                getNumberSubTypeConstraint(Double.class);
        mutableNumberType.setNumberSubTypeConstraint(numberSubTypeConstraint);

        // Set the minimum value to 1.0
        MutableMinimumValueConstraint minimumValue =
View Full Code Here

Examples of com.volantis.shared.metadata.type.constraint.NumberSubTypeConstraint

            (ImmutableNumberTypeImpl) unmarshall(
                getResourceAsString("res/number-with-sub-type-constraint-byte.xml"),
                ImmutableNumberTypeImpl.class);

        // check the created object
        final NumberSubTypeConstraint subTypeConstraint =
            number.getNumberSubTypeConstraint();
        assertEquals(Byte.class, subTypeConstraint.getNumberSubType());
        assertNull(number.getMinimumValueConstraint());

        final Object otherNumber = doRoundTrip(number);
        assertEquals(number, otherNumber);
    }
View Full Code Here

Examples of com.volantis.shared.metadata.type.constraint.NumberSubTypeConstraint

            minimumValueConstraint.getLimitAsNumber());
        final ImmutableMaximumValueConstraint maximumValueConstraint =
            number.getMaximumValueConstraint();
        assertEquals(new BigDecimal("4.2"),
            maximumValueConstraint.getLimitAsNumber());
        final NumberSubTypeConstraint subTypeConstraint =
            number.getNumberSubTypeConstraint();
        assertEquals(BigDecimal.class, subTypeConstraint.getNumberSubType());

        final Object otherNumber = doRoundTrip(number);
        assertEquals(number, otherNumber);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.