Examples of ObjectNotValidException


Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @param value the column value
     */
    protected void modifyValue(int i, Object value, boolean fireChangeEvent)
    {  // Check valid
        if (state == State.Invalid)
            throw new ObjectNotValidException(this);
        // Init original values
        if (modified == null)
        { // Save all original values
            modified = new boolean[fields.length];
            for (int j = 0; j < fields.length; j++)
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @param value the value
     */
    public void setValue(int index, Object value)
    {
        if (state == State.Invalid)
            throw new ObjectNotValidException(this);
        if (index < 0 || index >= fields.length)
            throw new InvalidArgumentException("index", index);
        // Strings special
        if ((value instanceof String) && ((String)value).length()==0)
            value = null;
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @param value the value
     */
    public final void setValue(Column column, Object value)
    {
        if (!isValid())
            throw new ObjectNotValidException(this);
        // Get Column Index
        setValue(getFieldIndex(column), value);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @return true if the field is read only
     */
    public boolean isFieldReadOnly(Column column)
    {
        if (rowset==null)
            throw new ObjectNotValidException(this);
      if (getFieldIndex(column)<0)
            throw new InvalidArgumentException("column", column);
      // Check key column
        if (isValid() && !isNew() && rowset.isKeyColumn((DBColumn)column))
          return true;
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

        DBReader r = new DBReader();
        try
        { // Check command
            DBCommand queryCmd = lti.getQueryCmd();
            if (queryCmd == null)
                throw new ObjectNotValidException(this);

            boolean loadPageFromPosition = lti.isValid() && lti.isAllowPagination();
            lti.setValid(false);

            if (lti.isSortOrderChanged())
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

            {   // A new record
                record = rec;
                return;
            }   
            // Not Valid
            throw new ObjectNotValidException(record);
        }
        // Record laden
        Connection conn = getPage().getConnection(rowset.getDatabase());
        record.read(rowset, recKey, conn);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

        // Record laden
        try {
            // Check Key
            if (record.isValid()==false)
            {   // Invalid Record key
                throw new ObjectNotValidException(record);
            }
            // Check Modified
            if (record.isModified()==false)
            {   // Not Modified
                return true;
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     */
    public void deleteRecord()
    {
        // check valid
        if (!record.isValid())
            throw new ObjectNotValidException(record);
        // delete
        Connection conn = getPage().getConnection(rowset.getDatabase());
        record.delete(conn);
        // Put key on Session
        this.removeSessionObject(Object[].class);
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

        public void init(int itemCount, int pageSize)
        {
            if (pageSize < 0)
            {   // pageSize must not be negative!
                throw new ObjectNotValidException(this);
            }
            this.itemCount = itemCount;
            this.pageSize = pageSize;
            this.position = 0;
            this.valid = (itemCount >= 0);
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

        public void setValid(boolean valid)
        {
            if (valid && (this.itemCount < 0))
            { // itemCount and position must not be negative!
                throw new ObjectNotValidException(this);
            }
            this.valid = valid;
        }
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.