Package railo.runtime.type.Collection

Examples of railo.runtime.type.Collection.Key


    return _____keys.containsKey(key)?"_"+key:null;
  }

  public static Key getKey(String key) {
    init();
    Key k = _____keys.get(key);
    if(k==null) return new KeyImpl(key);
    return k;
  }
View Full Code Here


    catch (Throwable t) {
      throw AxisFault.makeFault((Caster.toPageException(t)));
    }
  }
  public static Object _invoke(String name, Object[] args) throws PageException {
    Key key = Caster.toKey(name);
    Component c=component.get();
    PageContext p=pagecontext.get();
    if(c==null) throw new ApplicationException("missing component");
    if(p==null) throw new ApplicationException("missing pagecontext");
   
View Full Code Here

  }

  @Override
  public void setDynamicAttribute(String uri, String name, Object value) {
    if(attrs==null)attrs=new StructImpl();
    Key key = KeyImpl.getInstance(StringUtil.trim(name,""));
    attrs.setEL(key,value);
  }
View Full Code Here

  }

  @Override
  public void setDynamicAttribute(String uri, Collection.Key name, Object value) {
    if(attrs==null)attrs=new StructImpl();
    Key key = KeyImpl.getInstance(StringUtil.trim(name.getString(),""));
    attrs.setEL(key,value);
  }
View Full Code Here

   * stores a single method
   * @param method
   * @param methodsMap
   */
  private void storeMethod(Method method, StructImpl methodsMap) {
    Key methodName = KeyImpl.init(method.getName());
   
   
    Object o=methodsMap.get(methodName,null);
    Array methodArgs;
    if(o==null) {
View Full Code Here

            else if(value instanceof Map) {
             
              Map map=(Map) value;
          Iterator it = map.entrySet().iterator();
          Map.Entry entry;
          Key key;
          while(it.hasNext()) {
            entry=(Entry) it.next();
            key = Caster.toKey(entry.getKey(),null);
            if(!attributes.containsKey(key)){
              attributes.setEL(key,entry.getValue());
View Full Code Here

    else _serializeASQuery(name,query,sb,done);
  }

  private void _serializeWDDXQuery(String name,Query query,StringBuffer sb, Set<Object> done) throws ConverterException {
    Iterator<Key> it = query.keyIterator();
    Key k;
    sb.append("new WddxRecordset();");
   
    int recordcount=query.getRecordcount();
    int i=-1;
    while(it.hasNext()) {
      i++;
      k = it.next();
      if(useShortcuts)sb.append("col"+i+"=[];");
      else sb.append("col"+i+"=new Array();");
      // lower case ist ok!
      String skey = StringUtil.escapeJS(k.getLowerString());
      for(int y=0;y<recordcount;y++) {
       
        sb.append("col"+i+"["+y+"]=");
       
        _serialize("col"+i+"["+y+"]",query.getAt(k,y+1,null),sb,done);
View Full Code Here

        sb.append("{");
        boolean hasIgnores=ignoreSet!=null;
        Iterator<Key> it = struct.keyIterator();
        boolean doIt=false;
        deep++;
        Key key;
        while(it.hasNext()) {
            key = it.next();
            if(hasIgnores && ignoreSet.contains(key)) continue;
            if(doIt)sb.append(',');
            doIt=true;
            sb.append('\'');
            sb.append(escape(key.getString()));
            sb.append('\'');
            sb.append(':');
            _serialize(struct.get(key,null),sb,new HashSet<Object>());
        }
        deep--;
View Full Code Here

          doIt=false;
          Property p;
            Boolean remotingFetch;
          Struct props = ignoreRemotingFetch?null:ComponentUtil.getPropertiesAsStruct(ci,false);
          Entry<Key, Object> e;
          Key k;
          while(it.hasNext()) {
            e = it.next();
            k = e.getKey();
                //String key=Caster.toString(it.next(),"");
                if(KeyConstants._THIS.equalsIgnoreCase(k))continue;
                if(!ignoreRemotingFetch) {
                  p=(Property) props.get(k,null);
                  if(p!=null) {
                    remotingFetch=Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH,null),null);
                    if(remotingFetch==null){
                  if(isPeristent  && ORMUtil.isRelated(p)) continue;
                }
                else if(!remotingFetch.booleanValue()) continue;
                  }
            }
               
               
               
                member = e.getValue();
                if(member instanceof UDF)continue;
                if(doIt)sb.append(',');
                doIt=true;
                sb.append('\'');
                sb.append(escape(k.getString()));
                sb.append('\'');
                sb.append(':');
                _serialize(member,sb,done);
            }
            sb.append("}");
View Full Code Here

   */
  private void _serializeQuery(Query query, StringBuffer sb, Set<Object> done) throws ConverterException {
   
    //Collection.Key[] keys = query.keys();
    Iterator<Key> it = query.keyIterator();
    Key k;
    sb.append(goIn());
    sb.append("query(");
   
 
    deep++;
    boolean oDoIt=false;
    int len=query.getRecordcount();
    while(it.hasNext()) {
      k = it.next();
        if(oDoIt)sb.append(',');
        oDoIt=true;
        sb.append(goIn());
            sb.append('\'');
            sb.append(escape(k.getString()));
            sb.append('\'');
      sb.append(":[");
      boolean doIt=false;
      for(int y=1;y<=len;y++) {
          if(doIt)sb.append(',');
View Full Code Here

TOP

Related Classes of railo.runtime.type.Collection.Key

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.