Package org.apache.empire.exceptions

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


     * @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

     * @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

        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

            {   // 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

        // 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

     */
    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

        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

        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

   
    public Object getInputValue(UIComponent comp, InputInfo ii, boolean submitted)
    {
        UIInput input = getInputComponent(comp);
        if (input==null)
            throw new ObjectNotValidException(this);
       
        // Get value from Input
        Object value = (submitted) ? input.getSubmittedValue() : input.getValue();
        /* Patch for MyFaces?
        if (value==null && input.isLocalValueSet())
View Full Code Here

TOP

Related Classes of org.apache.empire.exceptions.ObjectNotValidException

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.