Package railo.runtime.type

Examples of railo.runtime.type.ArrayImpl


    if(source.isStorage())s.setEL(AppListenerUtil.STORAGE, source.isStorage());
    return s;
  }

  private static Array toArray(Mapping[] mappings) {
    Array arr=new ArrayImpl();
    if(mappings!=null)for(int i=0;i<mappings.length;i++){
      arr.appendEL(mappings[i].getStrPhysical());
    }
    return arr;
  }
View Full Code Here


  public static Array getParts(byte[] barr,String contentTypeHeader) throws IOException, PageException {
    String boundary = extractBoundary(contentTypeHeader,"");
    ByteArrayInputStream bis = new ByteArrayInputStream(barr);
    MultipartStream stream;
    Array result = new ArrayImpl();
    stream = new MultipartStream(bis,getBytes(boundary,"UTF-8"));//
   
    boolean hasNextPart = stream.skipPreamble();
    while (hasNextPart) {
      result.append(getPartData(stream));
      hasNextPart = stream.readBoundary();
    }
    return result;
  }
View Full Code Here

        else if(type==SearchIndex.TYPE_CUSTOM) {
          Query qv;
          if(StringUtil.isEmpty(query)){
           
          // set columns
            railo.runtime.type.Array columns=new ArrayImpl();
              columns.append("key");
              columns.append("body");
              if(!StringUtil.isEmpty(title))columns.append("title");
              if(!StringUtil.isEmpty(urlpath))columns.append("urlpath");
              if(!StringUtil.isEmpty(custom1))columns.append("custom1");
              if(!StringUtil.isEmpty(custom2))columns.append("custom2");
              if(!StringUtil.isEmpty(custom3))columns.append("custom3");
              if(!StringUtil.isEmpty(custom4))columns.append("custom4");
             
            // populate query with a single row
                qv=new QueryImpl(columns,1,"query");
                // body
                qv.setAt(KeyConstants._key, 1, key);
View Full Code Here

 
  private static final long serialVersionUID = 5883854318455975404L;

  public static Array call(PageContext pc , String list) {
    if(list.length()==0)
      return new ArrayImpl();
    return ListUtil.listToArrayRemoveEmpty(list,',');
  }
View Full Code Here

      names = _call(pc, packageName);
    } catch (IOException e) {
      throw Caster.toPageException(e);
    }
   
    Array arr=new ArrayImpl();
    String name;
    Iterator<String> it = names.iterator();
    while(it.hasNext()){
      name=it.next();
      if(StringUtil.endsWithIgnoreCase(name, ".cfc")) {
        name=name.substring(0,name.length()-4);
      }
      arr.appendEL(name);
    }
    return arr;
  }
View Full Code Here

 

  public static Array call(PageContext pc , String list, String delimiter,boolean includeEmptyFields,boolean multiCharacterDelimiter) {
    if(includeEmptyFields){
      if(list.length()==0) {
        Array a=new ArrayImpl();
        a.appendEL("");
        return a;
      }
      return ListUtil.listToArray(list,delimiter,multiCharacterDelimiter);
    }
    if(list.length()==0)
      return new ArrayImpl();
   
    return ListUtil.listToArrayRemoveEmpty(list,delimiter,multiCharacterDelimiter);
  }
View Full Code Here

  }
  private static Array nodelist(XObject rs, boolean caseSensitive) throws TransformerException, PageException {
   
    NodeList list = rs.nodelist();
    int len=list.getLength();
    Array rtn=new ArrayImpl();
    for(int i=0;i<len;i++) {
      Node n=list.item(i);
      if(n !=null)
      rtn.append(XMLCaster.toXMLStruct(n,caseSensitive));
    }
    return rtn;
  }
View Full Code Here

public class EntityNameArray{
 
  public static Array call(PageContext pc) throws PageException {
    ORMSession sess = ORMUtil.getSession(pc);
    return new ArrayImpl(sess.getEntityNames());
  }
View Full Code Here

   
    if(ee!=null) {
      throw ee;
    }
   
    Array rtn=new ArrayImpl();
    for(int i=0;i<arr.length;i++) {
        rtn.append(keys[arr[i].getOldPosition()].getString());
    }
    return rtn;
     
  }
View Full Code Here

    return _call(pc,hql,params,Caster.toBooleanValue(unique),Caster.toStruct(queryOptions));
  }
  private static Object _call(PageContext pc,String hql, Object params, boolean unique, Struct queryOptions) throws PageException {
    ORMSession session=ORMUtil.getSession(pc);
    if(params==null)
      return session.executeQuery(pc,hql,new ArrayImpl(),unique,queryOptions);
    else if(Decision.isStruct(params))
      return session.executeQuery(pc,hql,Caster.toStruct(params),unique,queryOptions);
    else if(Decision.isArray(params))
      return session.executeQuery(pc,hql,Caster.toArray(params),unique,queryOptions);
    else if(Decision.isCastableToStruct(params))
View Full Code Here

TOP

Related Classes of railo.runtime.type.ArrayImpl

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.