Examples of InvalidArgumentException


Examples of org.apache.empire.exceptions.InvalidArgumentException

     * @param stmt the new statement for this index, or NULL to remove the statement
     */
    public void setStmt(int i, String stmt)
    {
        if (i<0 || i>=sqlCmdList.size())
            throw new InvalidArgumentException("index", i);
        // replace or remove statement
        if (stmt==null)
            sqlCmdList.remove(i);
        else
            sqlCmdList.set(i, stmt);
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     */
    public static DBColumn findById(String columnId)
    {
        int i = columnId.lastIndexOf('.');
        if (i<0)
            throw new InvalidArgumentException("columnId", columnId);
        // rowset suchen
        String rsid = columnId.substring(0, i);
        DBRowSet rset = DBRowSet.findById(rsid);
        // column suchen
        String colname = columnId.substring(i+1);
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     */
    public void getDDLScript(DBCmdType type, DBObject dbo, DBSQLScript script)
    {
        // The Object's database must be attached to this driver
        if (dbo==null || dbo.getDatabase().getDriver()!=driver)
            throw new InvalidArgumentException("dbo", dbo);
        // Check Type of object
        if (dbo instanceof DBDatabase)
        { // Database
            switch (type)
            {
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

      private Object value;
     
      public Attribute(String name, Object value, String namespace)
        {   // check name
          if (name==null || (this.name=name.trim()).length()==0)
              throw new InvalidArgumentException("name", name);
          this.namespace = namespace;
            this.value = value;
        }
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     * @param script the sql script to which to append the dll command(s)
     */
    protected void dropObject(String name, String objType, DBSQLScript script)
    {
        if (name == null || name.length() == 0)
            throw new InvalidArgumentException("name", name);
        // Create Drop Statement
        StringBuilder sql = new StringBuilder();
        sql.append("DROP ");
        sql.append(objType);
        sql.append(" ");
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

        // Check state
        if (configRootNode == null)
            throw new ObjectNotValidException(this);
        // Check arguments
        if (bean == null)
            throw new InvalidArgumentException("bean", bean);
       
        Element propertiesNode = configRootNode; 
        for(String nodeName : propertiesNodeNames)
        {
            if (StringUtils.isEmpty(nodeName))
                throw new InvalidArgumentException("propertiesNodeNames", null);
            // Get configuration node
            propertiesNode = XMLUtil.findFirstChild(propertiesNode, nodeName);
            if (propertiesNode == null)
            { // Configuration
                log.error("Property-Node {} has not been found.", nodeName);
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     */
    public void readProperties(Object bean, Element propertiesNode)
    {
        // Check arguments
        if (propertiesNode == null)
            throw new InvalidArgumentException("propertiesNode", propertiesNode);
        if (bean == null)
            throw new InvalidArgumentException("bean", bean);
        // apply configuration
        log.info("reading bean properties from node: {}", propertiesNode.getNodeName());
        NodeList nodeList = propertiesNode.getChildNodes();
        for (int i = 0; i < nodeList.getLength(); i++)
        {
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     * @return true if the column was successfully added or false otherwise
     */
    protected void addColumn(DBViewColumn col)
    { // find column by name
        if (col == null || col.getRowSet() != this)
            throw new InvalidArgumentException("col", col);
        if (getColumn(col.getName())!=null)
            throw new ItemExistsException(col.getName());
        // add now
        columns.add(col);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     * @param table the DBTable object
     */
    protected void addTable(DBTable table)
    { // find column by name
        if (table == null || table.getDatabase() != this)
            throw new InvalidArgumentException("table", table);
        if (tables.contains(table)==true)
            throw new ItemExistsException(table.getName());
        // Check for second instances
        DBTable existing = getTable(table.getName());
        if (existing!=null)
View Full Code Here

Examples of org.apache.empire.exceptions.InvalidArgumentException

     * @param view the DBView object
     */
    protected void addView(DBView view)
    { // find column by name
        if (view == null || view.getDatabase() != this)
            throw new InvalidArgumentException("view", view);
        if (views.contains(view) == true)
            throw new ItemExistsException(view.getName());
        // add now
        views.add(view);
    }
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.