Package org.apache.empire.exceptions

Examples of org.apache.empire.exceptions.InvalidArgumentException


        // destination columns
        if (columns != null && columns.size() > 0)
        { // Check Count
            if (columns.size() != select.length)
            {
                throw new InvalidArgumentException("columns", "size()!=select.length");
            }
            // Append Names
            buf.append(" (");
            addListExpr(buf, columns, CTX_NAME, ", ");
            buf.append(")");
View Full Code Here


    public DBExpressionIndex(String name, boolean unique, DBExpr... columnExpressions)
    {
        super(name, (unique ? UNIQUE : STANDARD), null);
        // columnExpressions
        if (columnExpressions==null || columnExpressions.length==0)
            throw new InvalidArgumentException("columnExpressions", columnExpressions);
        // set expression
        this.columnExpressions = columnExpressions;
    }
View Full Code Here

     */
    @Override
    public Object[] getRecordKey(DBRecord record)
    {
        if (record == null || record.getRowSet() != this)
            throw new InvalidArgumentException("record", record);
        // get Key
        return (Object[]) record.getRowSetData();
    }
View Full Code Here

     */
    @Override
    public void readRecord(DBRecord rec, Object[] key, Connection conn)
    {
        if (conn == null || rec == null)
            throw new InvalidArgumentException("conn|rec", null);
        DBColumn[] keyColumns = getKeyColumns();
        if (key == null || keyColumns.length != key.length)
            throw new InvalidKeyException(this, key);
        // Select
        DBCommand cmd = getCommandFromExpression();
View Full Code Here

        // check updateable
        if (isUpdateable()==false)
            throw new NotSupportedException(this, "updateRecord");
        // check params
        if (rec == null)
            throw new InvalidArgumentException("record", null);
        if (conn == null)
            throw new InvalidArgumentException("conn", null);
        // Has record been modified?
        if (rec.isModified() == false)
            return; // Nothing to update
        // Must have key Columns
        DBColumn[] keyColumns = getKeyColumns();
View Full Code Here

     * @param table
     */
    void setTable(DBTable table)
    {
        if (table==null || !table.getIndexes().contains(this))
            throw new InvalidArgumentException("table", table);
        // table
        this.table = table;
    }
View Full Code Here

    @Override
    public Object getValue(int index)
    {
        // Check params
        if (index < 0 || index >= colList.length)
            throw new InvalidArgumentException("index", index);
        try
        {   // Get Value from Resultset
            DataType dataType = colList[index].getDataType();
            return db.driver.getResultValue(rset, index + 1, dataType);
View Full Code Here

            // Forward only cursor?
            int type = rset.getType();
            if (type == ResultSet.TYPE_FORWARD_ONLY)
            {
                if (count < 0)
                    throw new InvalidArgumentException("count", count);
                // Move
                for (; count > 0; count--)
                {
                    if (!moveNext())
                        return false;
View Full Code Here

     * @return true if the record has been initialized successfully or false otherwise
     */
    public void initRecord(DBRowSet rowset, DBRecord rec)
    {
      if (rowset==null)
          throw new InvalidArgumentException("rowset", rowset);
      // init Record
      rowset.initRecord(rec, this);
    }
View Full Code Here

     * @param column a column object
     */
    protected void addColumn(DBTableColumn column)
    { // find column by name
        if (column==null || column.getRowSet()!=this)
            throw new InvalidArgumentException("column", column);
        if (getColumn(column.getName())!=null)
            throw new ItemExistsException(column.getName());
        // add now
        columns.add(column);
    }
View Full Code Here

TOP

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

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.