Examples of EZArrayList


Examples of tools.util.EZArrayList

    public String findTable(String l)throws SQLException{
   

  String n = null;
  String v = null;
    Vector tables = new EZArrayList(sqps.keys());
    for (int ct = 0; ct < tables.size();ct++)
    {
      v = (String)tables.elementAt(ct);
    if (l.startsWith(v + "."))
      return v;


    }
View Full Code Here

Examples of tools.util.EZArrayList

  String n2 = null;
  String tt2 = null;
  Vector joined = new Vector();
  Vector j1 = null;
  Vector j2 = null;
    EZArrayList nvr = new EZArrayList();
    Vector vt = null;
    Object val = null;
    NameValuePairs ref = null;

 
 
    for (int ct = 0;ct < jincludealllist.size();ct++)
  {
    c = (Criteria)jincludealllist.elementAt(ct);
    n = c.getName();
    tt = findTable(n);
    //("************TT1 " + tt);
    if (sqp.getTableInfo().getColumnInfo(sqp.getRealColName(n)) != null)
      tt = sqp.getTable();
    //("************TT2 " + tt);

    n2 = c.getValueString();
    tt2 = findTable(n2);
    if (sqp.getTableInfo().getColumnInfo(sqp.getRealColName(n2)) != null && !tt.equals(sqp.getTable()))
      tt2 = sqp.getTable();
  //role.realm_username Cannot join the same table realm_user1:realm_user1
    if (tt.equals(tt2))
      tt = findTable(n);
    //("************TT3 " + tt);

    if (tt.equals(tt2))
     throw JGException.get("cannot_join_same_table",n + " Cannot join the same table " + tt + ":" + tt2);
   
    if (joined.contains(tt) && joined.contains(tt2))
     throw JGException.get("at_least_1_table_must_not_be_joined",n + " Trying to Join 2 tables already joined. At least 1 table must not be joined " + tt + ":" + tt2);
    if (joined.contains(tt))
      j1 = vr;
    else{
      if (tt.equals(sqp.getTable()))
        j1 = r;
      else
        j1 = new EZArrayList(getSQLParser(tt).getResultsTable().elements());
    }


    if (joined.contains(tt2))
    {
      j2 = vr;
    //("j2 1 " + j2);

    }
    else{
      if (tt2.equals(sqp.getTable())){
     
        j2 = r;
          //("j2 2 " + j2);

      }
      else{
     
        j2 = new EZArrayList(getSQLParser(tt2).getResultsTable().elements());
          //("j2 3 " + j2);

      }
    }
    nvr = new EZArrayList();
    vt = null;
    val = null;
    ref = null;
      for (int ct1 = 0; ct1 < j1.size(); ct1++){
      ref = (NameValuePairs)j1.elementAt(ct1);
      val = ref.get(n);
      if (val == null)continue;
      vt = joinTable(n2,j2,type,val,ref);
      if (vt.size() > 0)
        nvr.addEnumeration(vt.elements(),nvr);

      //for (int ct2 = 0; ct2 < j2.size(); ct2++){
     
        //Hashtable  (String rn,Hashtable h,int typ,Object v)

View Full Code Here

Examples of tools.util.EZArrayList


  Enumeration en = aliases.keys();
  String n = null;
  String v = null;
    Vector tables = new EZArrayList(sqps.keys());
    for (int ct = 0; ct < tables.size();ct++)
    {
      v = (String)tables.elementAt(ct);
    if (l.startsWith(v + "."))
      return v;


    }
View Full Code Here

Examples of tools.util.EZArrayList

      int i = itm.indexOf( ".");
     
      if (i > 0){
      String t = itm.substring(0,i);
      t = StringUtil.getTrimmedValue(t);
    Vector tables = new EZArrayList(sqps.keys());

      if (!tables.contains(t))
      {
        String t2 = (String)aliases.get(t);
        if (t2 != null)
          t = t2;
      }
View Full Code Here

Examples of tools.util.EZArrayList

      int i = itm.indexOf( ".");
     
      if (i > 0){
      String t = itm.substring(0,i);
      t = StringUtil.getTrimmedValue(t);
    Vector tables = new EZArrayList(sqps.keys());

      if (!tables.contains(t))
      {
        String t2 = (String)aliases.get(t);
        if (t2 != null)
          t = t2;
      }
View Full Code Here

Examples of tools.util.EZArrayList

  }
 
  public void parseTables(String t)throws SQLException{
      //("UPT: " + t);
      merge();
      EZArrayList uv = new EZArrayList(new StringTokenizer(t,","));
      //(" PARSE U aaaa :" + t + ":");

      String upstr = null;
      for (int ct = 0;ct < uv.size();ct++){
      upstr = uv.elementAt(ct).toString();
      upstr = upstr.trim();
      //(" PARSE U :" + upstr + ":");
      int i = upstr.toLowerCase().indexOf(" as ");
      if (i > 0){
        String alias = upstr.substring(i + " as ".length(),upstr.length());
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.