Examples of ObjectNotValidException


Examples of lib.exceptions.ObjectNotValidException

        } catch (PersistenceMechanismException e) {
          throw new RepositoryException(e.getMessage());
        }
      }
    } else {
      throw new ObjectNotValidException(ExceptionMessages.EXC_NULO);
    }
  }
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

    public boolean loadFormData()
    {
        try {
            Record record = getRecord();
            if (record.isValid()==false)
                throw new ObjectNotValidException(record);
            // Load Data
            return setUpdateFields(record);

        } catch(Exception e) {
            // Action failed
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

        Object[] keyValues = getActionParamKey();
        if (isValid()==false || keyValues==null)
            throw new InvalidFormDataException();
        // Check Record
        if (record==null || !record.isValid())
            throw new ObjectNotValidException(record);
        // Check Key Length
        Column[] keyColumns = record.getKeyColumns();
        if (keyValues.length!=keyColumns.length)
            throw new InvalidFormDataException();
        // Copy values
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

            {   // get record object from session
                Record rec = getRecordFromSession();
                if (rec!=null && (rec instanceof DBRecord))
                {   // Check rowset
                    if (((DBRecord)rec).getRowSet()!=rowset)
                        throw new ObjectNotValidException(rec);
                    // Record restored
                    this.record = (DBRecord)rec;
                }
                // Record not found
                throw new ItemNotFoundException(rowset.getName());
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

        try {
            // Record is not valid
            if (record.isValid()==false)
            {  
                log.error("Cannot save changes: record ist not valid");
                throw new ObjectNotValidException(record);
            }
            // Update Record
            updateRecord(action.getConnection());
            // Save Record Key Info
            persistOnSession();
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

    protected void prepareInitRecord(DBRecord rec, Object rowSetData, boolean insert)
    {
        if (rec==null)
            throw new InvalidArgumentException("rec", rec);
        if (columns.size() < 1)
            throw new ObjectNotValidException(this);
        // Init
        rec.initData(this, rowSetData, insert);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

            throw new NotSupportedException(this, "updateRecord");
        // Check Arguments
        if (rec == null)
            throw new InvalidArgumentException("record", rec);
        if (rec.isValid()==false)
            throw new ObjectNotValidException(rec);
        if (conn == null)
            throw new InvalidArgumentException("conn", conn);
        // Get the new Timestamp
        String name = getName();
        Timestamp timestamp = (timestampColumn!=null) ? db.getUpdateTimestamp(conn) : null;
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

    @Override
    public synchronized void getSelect(StringBuilder buf)
    {       
        resetParamUsage();
        if (select == null)
            throw new ObjectNotValidException(this);
        // limit rows
        boolean usePreparedStatements = isPreparedStatementsEnabled();
        if (limitRows>=0)
        {   // add limitRows and skipRows wrapper
            buf.append("SELECT * FROM (");
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

            // found the join
            updateJoin = jex;
            break;
        }
        if (updateJoin==null)
            throw new ObjectNotValidException(this);
        Set<DBColumn> joinColumns = new HashSet<DBColumn>();
        updateJoin.addReferencedColumns(joinColumns);
        // using
        buf.append("\r\nUSING ");
        DBCommand inner = this.clone();
View Full Code Here

Examples of org.apache.empire.exceptions.ObjectNotValidException

     * @return the insert into SQL-Command
     */
    protected String getInsertInto(DBTable table, DBColumnExpr[] select, List<DBColumnExpr> columns)
    {
        if (select == null)
            throw new ObjectNotValidException(this);
        // prepare buffer
        StringBuilder buf = new StringBuilder("INSERT INTO ");
        table.addSQL(buf, CTX_FULLNAME);
        // destination columns
        if (columns != null && columns.size() > 0)
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.