Package javax.servlet.jsp.jstl.sql

Examples of javax.servlet.jsp.jstl.sql.SQLExecutionTag


    }

    if (parent == null)
      throw new JspException(L.l("sql:dateParam requires sql:query parent."));

    SQLExecutionTag tag = (SQLExecutionTag) parent;

    tag.addSQLParameter(result);
   
    return SKIP_BODY;
  }
View Full Code Here


    }

    if (parent == null)
      throw new JspException(L.l("sql:param requires sql:query parent."));

    SQLExecutionTag tag = (SQLExecutionTag) parent;

    tag.addSQLParameter(value);
   
    return SKIP_BODY;
  }
View Full Code Here

    }

    if (parent == null)
      throw new JspException(L.l("sql:param requires sql:query parent."));

    SQLExecutionTag tag = (SQLExecutionTag) parent;

    tag.addSQLParameter(value);
   
    return EVAL_PAGE;
  }
View Full Code Here

    }

    if (parent == null)
      throw new JspException(L.l("sql:dateParam requires sql:query parent."));

    SQLExecutionTag tag = (SQLExecutionTag) parent;

    tag.addSQLParameter(result);
   
    return SKIP_BODY;
  }
View Full Code Here

    }

    if (parent == null)
      throw new JspException(L.l("sql:param requires sql:query parent."));

    SQLExecutionTag tag = (SQLExecutionTag) parent;

    tag.addSQLParameter(value);
   
    return SKIP_BODY;
  }
View Full Code Here

    //*********************************************************************
    // Tag logic

    public int doEndTag() throws JspException {
  SQLExecutionTag parent = (SQLExecutionTag)
      findAncestorWithClass(this, SQLExecutionTag.class);
  if (parent == null) {
      throw new JspTagException(
                Resources.getMessage("SQL_PARAM_OUTSIDE_PARENT"));
  }

        if (value != null) {
            convertValue();
        }

  parent.addSQLParameter(value);
  return EVAL_PAGE;
    }
View Full Code Here

    //*********************************************************************
    // Tag logic

    public int doEndTag() throws JspException {
  SQLExecutionTag parent = (SQLExecutionTag)
      findAncestorWithClass(this, SQLExecutionTag.class);
  if (parent == null) {
      throw new JspTagException(
                Resources.getMessage("SQL_PARAM_OUTSIDE_PARENT"));
  }

  Object paramValue = null;
  if (value != null) {
      paramValue = value;
  }
  else if (bodyContent != null) {
      paramValue = bodyContent.getString().trim();
      if (((String) paramValue).trim().length() == 0) {
    paramValue = null;
      }
  }

  parent.addSQLParameter(paramValue);
  return EVAL_PAGE;
    }
View Full Code Here

    //*********************************************************************
    // Tag logic

    public int doEndTag() throws JspException {
  SQLExecutionTag parent = (SQLExecutionTag)
      findAncestorWithClass(this, SQLExecutionTag.class);
  if (parent == null) {
      throw new JspTagException(
                Resources.getMessage("SQL_PARAM_OUTSIDE_PARENT"));
  }

  Object paramValue = null;
  if (value != null) {
      paramValue = value;
  }
  else if (bodyContent != null) {
      paramValue = bodyContent.getString().trim();
      if (((String) paramValue).trim().length() == 0) {
    paramValue = null;
      }
  }

  parent.addSQLParameter(paramValue);
  return EVAL_PAGE;
    }
View Full Code Here

    //*********************************************************************
    // Tag logic

    public int doEndTag() throws JspException {
  SQLExecutionTag parent = (SQLExecutionTag)
      findAncestorWithClass(this, SQLExecutionTag.class);
  if (parent == null) {
      throw new JspTagException(
                Resources.getMessage("SQL_PARAM_OUTSIDE_PARENT"));
  }

        if (value != null) {
            convertValue();
        }

  parent.addSQLParameter(value);
  return EVAL_PAGE;
    }
View Full Code Here

    }
   
    protected String type = null;
   
    public void doTag(XMLOutput output) throws JellyTagException {
        SQLExecutionTag parent
            = (SQLExecutionTag)findAncestorWithClass
                (this, SQLExecutionTag.class);
        if (parent == null) {
            throw new JellyTagException
                (Resources.getMessage("SQL_PARAM_OUTSIDE_PARENT"));
        }

        Object paramValue = value;
        if (value != null) {
            paramValue = value;
        } else {
            String bodyContent = getBodyText();
            if (bodyContent != null) {
                bodyContent = bodyContent.trim();
                if (bodyContent.length() > 0) {
                    paramValue = bodyContent;
                }
            }
        }

        if (type != null) {
            int typeVal = Integer.MIN_VALUE;
            if (type.equals("ARRAY")) {
                typeVal = Types.ARRAY;
            } else if (type.equals("BLOB")) {
                typeVal = Types.BLOB;
            } else if (type.equals("CLOB")) {
                typeVal = Types.CLOB;
            } else if (type.equals("REF")) {
                typeVal = Types.REF;
            } else if (type.equals("DATALINK")) {
                typeVal = Types.DATALINK;
            } else if (type.equals("BOOLEAN")) {
                typeVal = Types.BOOLEAN;
            } else if (type.equals("BIT")) {
                typeVal = Types.BIT;
            } else if (type.equals("TINYINT")) {
                typeVal = Types.TINYINT;
            } else if (type.equals("SMALLINT")) {
                typeVal = Types.SMALLINT;
            } else if (type.equals("INTEGER")) {
                typeVal = Types.INTEGER;
            } else if (type.equals("BIGINT")) {
                typeVal = Types.BIGINT;
            } else if (type.equals("FLOAT")) {
                typeVal = Types.FLOAT;
            } else if (type.equals("REAL")) {
                typeVal = Types.REAL;
            } else if (type.equals("DOUBLE")) {
                typeVal = Types.DOUBLE;
            } else if (type.equals("NUMERIC")) {
                typeVal = Types.NUMERIC;
            } else if (type.equals("DECIMAL")) {
                typeVal = Types.DECIMAL;
            } else if (type.equals("CHAR")) {
                typeVal = Types.CHAR;
            } else if (type.equals("VARCHAR")) {
                typeVal = Types.VARCHAR;
            } else if (type.equals("LONGVARCHAR")) {
                typeVal = Types.LONGVARCHAR;
            } else if (type.equals("DATE")) {
                typeVal = Types.DATE;
            } else if (type.equals("TIME")) {
                typeVal = Types.TIME;
            } else if (type.equals("TIMESTAMP")) {
                typeVal = Types.TIMESTAMP;
            } else if (type.equals("BINARY")) {
                typeVal = Types.BINARY;
            } else if (type.equals("VARBINARY")) {
                typeVal = Types.VARBINARY;
            } else if (type.equals("LONGVARBINARY")) {
                typeVal = Types.LONGVARBINARY;
            } else if (type.equals("NULL")) {
                typeVal = Types.NULL;
            } else if (type.equals("OTHER")) {
                typeVal = Types.OTHER;
            } else if (type.equals("JAVA_OBJECT")) {
                typeVal = Types.JAVA_OBJECT;
            } else if (type.equals("DISTINCT")) {
                typeVal = Types.DISTINCT;
            } else if (type.equals("STRUCT")) {
                typeVal = Types.STRUCT;
            } else {
                throw new JellyTagException
                    ("Unrecognized value in \"type\" attribute.");
            }
       
            parent.addSQLParameter (new ParamAttributes(paramValue, typeVal));
            return;
        }
        parent.addSQLParameter(paramValue);
    }
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.jstl.sql.SQLExecutionTag

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.