Package com.sun.jdo.api.persistence.support

Examples of com.sun.jdo.api.persistence.support.JDOUserException


        this.pm = pm;
        this.persistenceCapableClass = persistenceCapableClass;

        // check persistenceCapableClass parameter being null
        if (persistenceCapableClass == null)
            throw new JDOUserException(
                    I18NHelper.getMessage(messages, "jdo.extentcollection.constructor.invalidclass", "null"));// NOI18N
        // check persistence-capable
        if (Model.RUNTIME.getMappingClass(persistenceCapableClass.getName(),
                persistenceCapableClass.getClassLoader()) == null)
            throw new JDOUserException(
                    I18NHelper.getMessage(messages, "jdo.extentcollection.constructor.nonpc", // NOI18N
                            persistenceCapableClass.getName()));

        // subclasses == true is not yet supported
        if (subclasses)
View Full Code Here


    }

    private void assertIsValid(Number number, double min_value, double max_value) {
        double x = number.doubleValue();
        if (x < min_value)
            throw new JDOUserException(I18NHelper.getMessage(messages,
                    "core.fielddesc.minvalue", // NOI18N
                    new Object[]{number, String.valueOf(min_value), fieldType.getName()}));
        if (x > max_value)
            throw new JDOUserException(I18NHelper.getMessage(messages,
                    "core.fielddesc.maxvalue", // NOI18N
                    new Object[]{number, String.valueOf(max_value), fieldType.getName()}));
    }
View Full Code Here

            bd = (BigDecimal) number;
        } else {
            bd = new BigDecimal(number.toString());
        }
        if (bd.compareTo(LONG_MIN_VALUE) < 0) {
            throw new JDOUserException(I18NHelper.getMessage(messages,
                    "core.fielddesc.minvalue", // NOI18N
                    new Object[]{number, String.valueOf(Long.MIN_VALUE),
                        fieldType.getName()}));

        } else if (bd.compareTo(LONG_MAX_VALUE) > 0) {
            throw new JDOUserException(I18NHelper.getMessage(messages,
                    "core.fielddesc.maxvalue", // NOI18N
                    new Object[]{number, String.valueOf(Long.MAX_VALUE),
                        fieldType.getName()}));
        }
    }
View Full Code Here

     * for this database
     */
    public String getSqrt() {
        String s = (String)dbMap.get(SQRT);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "Sqrt"));
        }

        if (logger.isLoggable()) {
View Full Code Here

     * for this database
     */
    public String getAbs() {
        String s = (String)dbMap.get(ABS);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "Abs"));
        }

        if (logger.isLoggable()) {
View Full Code Here

     * for this database
     */
    public String getSubstring() {
        String s = (String)dbMap.get(SUBSTRING);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "substring"));
        }

        if (logger.isLoggable()) {
View Full Code Here

     * for this database
     */
    public String getSubstringFrom() {
        String s = (String)dbMap.get(SUBSTRING_FROM);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "from part of substring"));
        }

        if (logger.isLoggable()) {
View Full Code Here

     * for this database
     */
    public String getSubstringFor() {
        String s = (String)dbMap.get(SUBSTRING_FOR);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "for part of substring"));
        }

        if (logger.isLoggable()) {
View Full Code Here

     * for this database
     */
    public String getPosition() {
        String s = (String)dbMap.get(POSITION);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "position"));
        }

        if (logger.isLoggable()) {
View Full Code Here

     * for this database
     */
    public String getPositionSep() {
        String s = (String)dbMap.get(POSITION_SEP);
        if (s == null) {
           throw new JDOUserException(I18NHelper.getMessage(messages,
               "core.constraint.illegalop", // NOI18N
               "in part of position"));
        }

        if (logger.isLoggable()) {
View Full Code Here

TOP

Related Classes of com.sun.jdo.api.persistence.support.JDOUserException

Copyright © 2018 www.massapicom. 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.