Package easyJ.system.data

Examples of easyJ.system.data.Dictionary


     * @param relatedValue
     * @return
     */
    public static Long getIdByRelatedValue(String type, Long relatedValue)
            throws EasyJException {
        Dictionary dict = new Dictionary();
        dict.setDicType(type);
        dict.setRelatedValue(relatedValue);
        ArrayList list = sdp.query(dict);
        if (list.size() == 0) {
            return null;
        } else {
            dict = (Dictionary) list.get(0);
            return dict.getDicValueId();
        }
    }
View Full Code Here


     */
    public static StringBuffer getHtmlSelect(String propertyName,
            String propertyValueTable, Object propertyValue, Object displayValue)
            throws EasyJException {
        StringBuffer buffer = new StringBuffer();
        Dictionary dic = new Dictionary();
        dic.setDicType(propertyValueTable);       
        dic.setUseState("Y");
        OrderRule orderRule = new OrderRule();
        orderRule.setOrderColumn("dicSequence");
        orderRule.setOrderDirection(OrderDirection.ASC);
        OrderRule[] orderRules = {
            orderRule
        };
        List valueDatas = sdf.query(dic, orderRules);
        String showType = null;
        Object rootId = null;
        if (valueDatas.size() > 0) {
            dic = (Dictionary) valueDatas.get(0);
            showType = dic.getShowType();
            rootId = dic.getDicValueId();
        }
        if ("select".equals(showType)) {
            buffer.append("<select name=\"" + propertyName + "\">\n");
            buffer.append("<option value=\"\"></option>\n");
            for (int i = 1; i < valueDatas.size(); i++) {
                dic = (Dictionary) valueDatas.get(i);
                if (dic.getDicValueId().equals(propertyValue))
                    buffer.append("<option value=\"" + dic.getDicValueId()
                            + "\" selected>" + dic.getDicValueName()
                            + "</option>\n");
                else
                    buffer.append("<option value=\"" + dic.getDicValueId()
                            + "\">" + dic.getDicValueName() + "</option>\n");
            }
            buffer.append("</select>\n");
        } else {
            buffer
                    .append("<input type=\"text\" onclick=\"PopUpWindow.showTree('"
View Full Code Here

     */
    public static StringBuffer getHtmlSelect(String propertyName,
            String propertyValueTable, Object propertyValue, Object displayValue)
            throws EasyJException {
        StringBuffer buffer = new StringBuffer();
        Dictionary dic = new Dictionary();
        dic.setDicType(propertyValueTable);
        dic.setUseState("Y");
        OrderRule orderRule = new OrderRule();
        orderRule.setOrderColumn("dicSequence");
        orderRule.setOrderDirection(OrderDirection.ASC);
        OrderRule[] orderRules = {
            orderRule
        };
        List valueDatas = sdf.query(dic, orderRules);
        String showType = null;
        Object rootId = null;
        if (valueDatas.size() > 0) {
            dic = (Dictionary) valueDatas.get(0);
            showType = dic.getShowType();
            rootId = dic.getDicValueId();
        }
        if ("select".equals(showType)) {
            buffer.append("<select name=\"" + propertyName + "\">\n");
            buffer.append("<option value=\"\"></option>\n");
            for (int i = 1; i < valueDatas.size(); i++) {
                dic = (Dictionary) valueDatas.get(i);
                if (dic.getDicValueId().equals(propertyValue))
                    buffer.append("<option value=\"" + dic.getDicValueId()
                            + "\" selected>" + dic.getDicValueName()
                            + "</option>\n");
                else
                    buffer.append("<option value=\"" + dic.getDicValueId()
                            + "\">" + dic.getDicValueName() + "</option>\n");
            }
            buffer.append("</select>\n");
        } else {
            buffer
                    .append("<input type=\"text\" onclick=\"PopUpWindow.showTree('"
View Full Code Here

     * @return
     * @throws EasyJException
     */
    public static StringBuffer getCheckBoxsFromDic(String dicType,
        String propertyName, Object propertyValue, int line) throws EasyJException {
      Dictionary lower = new Dictionary();
      //这样,parentId大于等于2,就不会把表名称选进来
      lower.setDicType(dicType);
      lower.setParentId(new Long(2));
      lower.setUseState("Y");
     
      Dictionary upper = (Dictionary)BeanUtil.cloneObject(lower);
      upper.setParentId(null);
     
        OrderRule orderRule = new OrderRule();
        orderRule.setOrderColumn("dicSequence");
        orderRule.setOrderDirection(OrderDirection.ASC);
        OrderRule[] orderRules = {
View Full Code Here

     * @return
     * @throws EasyJException
     */
    public static StringBuffer getRadiosFromDic(String dicType,
        String propertyName, Object propertyValue, int line) throws EasyJException {
      Dictionary lower = new Dictionary();
      //这样,parentId大于等于2,就不会把表名称选进来
      lower.setDicType(dicType);
      lower.setParentId(new Long(2));
      lower.setUseState("Y");
     
      Dictionary upper = (Dictionary)BeanUtil.cloneObject(lower);
      upper.setParentId(null);
     
        OrderRule orderRule = new OrderRule();
        orderRule.setOrderColumn("dicSequence");
        orderRule.setOrderDirection(OrderDirection.ASC);
        OrderRule[] orderRules = {
View Full Code Here

   * @throws EasyJException
   */
  public static StringBuffer getCheckBoxsFromDic(String dicType,
      String propertyName, Object propertyValue, int line)
      throws EasyJException {
    Dictionary lower = new Dictionary();
    // 这样,parentId大于等于2,就不会把表名称选进来
    lower.setDicType(dicType);
    lower.setParentId(new Long(2));
    lower.setUseState("Y");

    Dictionary upper = (Dictionary) BeanUtil.cloneObject(lower);
    upper.setParentId(null);

    OrderRule orderRule = new OrderRule();
    orderRule.setOrderColumn("dicSequence");
    orderRule.setOrderDirection(OrderDirection.ASC);
    OrderRule[] orderRules = { orderRule };
View Full Code Here

   * @throws EasyJException
   */
  public static StringBuffer getRadiosFromDic(String dicType,
      String propertyName, Object propertyValue, int line)
      throws EasyJException {
    Dictionary lower = new Dictionary();
    // 这样,parentId大于等于2,就不会把表名称选进来
    lower.setDicType(dicType);
    lower.setParentId(new Long(2));
    lower.setUseState("Y");

    Dictionary upper = (Dictionary) BeanUtil.cloneObject(lower);
    upper.setParentId(null);

    OrderRule orderRule = new OrderRule();
    orderRule.setOrderColumn("dicSequence");
    orderRule.setOrderDirection(OrderDirection.ASC);
    OrderRule[] orderRules = { orderRule };
View Full Code Here

TOP

Related Classes of easyJ.system.data.Dictionary

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.