Package tools.util

Examples of tools.util.NameValue


    //(sqp.getUpdateList() +" VR tabffff234 " + h);
   
    Enumeration en = h.keys();
    String rid = null;
    Vector ul = sqp.getUpdateList();//null;
    NameValue nv = null;
    Row ur = null;
    updatedRowsCount = 0;
    while (en.hasMoreElements())
    {
      rid = en.nextElement().toString();
      ur = (Row)h.get(rid);
      //ul = sqp.getUpdateList();
      for (int ct = 0; ct < ul.size();ct++)
      {
      nv = (NameValue)ul.elementAt(ct);
   
      //gappe.updateTableValue(, sqp.getTable(),nv.name,nv.value.toString(),rid);
      ur.put(nv.name,sqp.convert(nv.value,nv.name));
      }
      gappe.updateTableValue( sqp.getTable(),ur,sqp);
      updatedRowsCount ++;
    }

    }
    else if (sqp.getAction().equals("delete"))
    {
        TableInfo tp = Gateway.get(connection.getProperties()).readTableInfo(sqp.getTable());
                  if (tp == null || tp.size() < 1)
           throw JGException.get("table_not_exist","Table does not exists! " + sqp.getTable());
       
        //SQLCriteria:realm_username=ruser2]:[]
        Vector vil = sqp.getIncludeAllList() ;
        Criteria cr = null;
        for (int ctvil = 0; ctvil < vil.size(); ctvil++)
        {
          cr = (Criteria)vil.elementAt(ctvil);
          if (tp.getColumnInfo(cr.getName()) == null)
           throw JGException.get("column_not_exist","Column does not exists! " + cr.getName());

        }
       
        Hashtable h = Gateway.get(connection.getProperties()).readTableValue(sqp.getTable(),sqp.getIncludeAllList(),sqp.getSelectList(),sqp.getEitherOrAllList(),sqp.isDistinct(),sqp);
    if (h == null) return true;
    Vector r = new EZArrayList(h.elements());
   
    Enumeration en = h.keys();
    String rid = null;
    Vector ul = null;
    NameValue nv = null;
    Row row = null;
    updatedRowsCount = 0;
    while (en.hasMoreElements())
    {
      rid = en.nextElement().toString();
View Full Code Here


 
  en = sexp.parse(t);
  }catch (Exc)*/
  while (en.hasMoreElements())
  {
    NameValue nv = (NameValue)en.nextElement();
  Enumeration eni = null;
  try{
 
   eni = sexp.parse(nv.value);
  }catch (Exception e){
View Full Code Here

 
    public NameValue parseUpdate(String tok)throws SQLException{
    tok = StringUtil.getTrimmedValue(tok);
    int i = tok.indexOf("=");
    if (i > 0){
      NameValue nv = new NameValue();
      nv.name = tok.substring(0,i).trim();
      nv.value = StringUtil.getTrimmedValue(tok.substring(i + 1,tok.length()).trim());
      nv.value = decode(nv.value);

      //va = StringUtil.getTrimmedValue(va);
      //va = decode(va);
      //hash.put(n,convert(va,n));


      return nv;
     
    }
   
    String tok2 = tok;
    i = tok2.indexOf(" in ");
    if (i > 0){
      String n = tok.substring(0,i);
      String v = tok.substring(i +" in ".length(),tok.length());
      v = v.trim();
      if (v.startsWith("("))
        v = v.substring(1,v.length());
      if (v.endsWith(")"))
        v = v.substring(0,v.length() -1);
      v = v.trim()
      NameValue nv = new NameValue();
      nv.name = n;
      nv.value = v;
      return nv;
    }
    return null;
View Full Code Here

TOP

Related Classes of tools.util.NameValue

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.