Package org.apache.empire.db.exceptions

Examples of org.apache.empire.db.exceptions.FieldNotNullException


                    cmd.set(col.to(value));
                    setCount++;
                }
                else if (primaryKey!=null && primaryKey.contains(col))
                {   // All primary key fields must be supplied
                    throw new FieldNotNullException(col);
                }
                else if (col.isRequired())
                {   // Error Column is required!
                    throw new FieldNotNullException(col);
                }
            }
            sql = cmd.getInsert();
        }
        else if (recordState==DBRecord.State.Modified)
View Full Code Here


    @Override
    public Object validate(Object value)
    {
        // Check for NULL
        if (isRequired() && ObjectUtils.isEmpty(value))
            throw new FieldNotNullException(this);
        // Is value valid
        switch (type)
        {
            case DATE:
            case DATETIME:
View Full Code Here

            // Make sure null values are not forced to be required
            boolean isNull = ObjectUtils.isEmpty(value);
            if (isNull)
            {   // Check Required
                if (isRequired())
                    throw new FieldNotNullException(column);
                return; // not required
            }
            // validate through record (if any)
            if ((getRecord() instanceof Record))
               ((Record)getRecord()).validateValue(column, value);
View Full Code Here

    }

    public Object validate(Object value)
    {
        if (ObjectUtils.isEmpty(value) && isRequired())
            throw new FieldNotNullException(this);
        return value;
    }
View Full Code Here

                    cmd.set(col.to(value));
                    setCount++;
                }
                else if (primaryKey!=null && primaryKey.contains(col))
                {   // All primary key fields must be supplied
                    throw new FieldNotNullException(col);
                }
                else if (col.isRequired())
                {   // Error Column is required!
                    throw new FieldNotNullException(col);
                }
            }
            sql = cmd.getInsert();
        }
        else if (recordState==DBRecord.State.Modified)
View Full Code Here

                    cmd.set(col.to(value));
                    setCount++;
                }
                else if (primaryKey!=null && primaryKey.contains(col))
                {   // All primary key fields must be supplied
                    throw new FieldNotNullException(col);
                }
                else if (col.isRequired())
                {   // Error Column is required!
                    throw new FieldNotNullException(col);
                }
            }
            sql = cmd.getInsert();
        }
        else if (recordState==DBRecord.State.Modified)
View Full Code Here

    }

    public void validate(Object value)
    {
        if (ObjectUtils.isEmpty(value) && isRequired())
            throw new FieldNotNullException(this);
    }
View Full Code Here

    @Override
    public void validate(Object value)
    {
        // Check for NULL
        if (isRequired() && (value == null || value.toString().length() < 1))
            throw new FieldNotNullException(this);
        // Is value valid
        switch (type)
        {
            case DATE:
            case DATETIME:
View Full Code Here

                        cmd.set(col.to(value));
                        setCount++;
                    }
                    else if (primaryKey!=null && primaryKey.contains(col))
                    {   // All primary key fields must be supplied
                        throw new FieldNotNullException(col);
                    }
                    else if (col.isRequired())
                    {   // Error Column is required!
                        throw new FieldNotNullException(col);
                    }
                }
                sql = cmd.getInsert();
                break;
View Full Code Here

            // Make sure null values are not forced to be required
            boolean isNull = ObjectUtils.isEmpty(value);
            if (isNull)
            {   // Check Required
                if (isRequired())
                    throw new FieldNotNullException(column);
                return; // not required
            }
            // validate through record (if any)
            if ((getRecord() instanceof Record))
               ((Record)getRecord()).validateValue(column, value);
View Full Code Here

TOP

Related Classes of org.apache.empire.db.exceptions.FieldNotNullException

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.