Package railo.runtime.converter

Examples of railo.runtime.converter.ScriptConverter


    }
  }

  public void writeExternal(ObjectOutput out) {
    try {
      out.writeUTF(new ScriptConverter().serialize(this));
    }
    catch (Throwable t) {}
  }
View Full Code Here


  private static int _update(Config config,Connection conn,String cfid, String applicationName, String strSQL,Struct data, long timeSpan, Log log, TimeZone tz) throws SQLException, PageException {
    //String appName = pc.getApplicationContext().getName();
    try{
      SQLImpl sql = new SQLImpl(strSQL,new SQLItem[]{
        new SQLItemImpl(createExpires(config,timeSpan),Types.VARCHAR),
        new SQLItemImpl(new ScriptConverter().serializeStruct(data,ignoreSet),Types.VARCHAR),
        new SQLItemImpl(cfid,Types.VARCHAR),
        new SQLItemImpl(applicationName,Types.VARCHAR)
      });
      ScopeContext.info(log,sql.toString());
     
View Full Code Here

        if(caller instanceof Scope) VariableInterpreter.setVariable(pageContext,var,traceValue,(Scope)caller);
        else pageContext.setVariable(var,traceValue);
      }
     
      try {
        varValue=new ScriptConverter().serialize(value);
      }
      catch (ConverterException e) {
        if(value!=null)varValue="("+Caster.toTypeName(value)+")";
      }
     
View Full Code Here

 
  @Override
  public String toString() {
    String strDynAttrs="";
    try{
    strDynAttrs=new ScriptConverter().serialize(dynAttrs);
    }
    catch(ConverterException ce){}
   
    return "default:"+this._default+";displayname:"+this.displayname+";hint:"+this.hint+
    ";name:"+this.name+";type:"+this.type+";ownerName:"+ownerName+";attrs:"+strDynAttrs+";";
View Full Code Here

   * @return
   */
  public static String serialize(Object object) {
    if(object==null) return "[null]";
    try {
      return new ScriptConverter().serialize(object);
    }
    catch (Throwable t) {
      return object.toString();
    }
  }
View Full Code Here

        }
        pc.forceWrite(prefix+converter.serialize(pc,rtn,byColumn));
    }
    // CFML
    else if(UDF.RETURN_FORMAT_SERIALIZE==props.format) {
      ScriptConverter converter = new ScriptConverter(false);
      pc.forceWrite(converter.serialize(rtn));
    }
      // XML
    else if(UDF.RETURN_FORMAT_XML==props.format) {
      XMLConverter converter = new XMLConverter(pc.getTimeZone(),false);
            converter.setTimeZone(pc.getTimeZone());
            pc.forceWrite(converter.serialize(rtn));
    }
    // Plain
    else if(UDF.RETURN_FORMAT_PLAIN==props.format) {
      pc.forceWrite(Caster.toString(rtn));
    }
View Full Code Here

            is = new ByteArrayInputStream(str.getBytes(cs));
       
        }
        // CFML
    else if(UDF.RETURN_FORMAT_SERIALIZE==format) {
      ScriptConverter converter = new ScriptConverter(false);
      String str=converter.serialize(rtn);
            cs = getCharset(pc);
            is = new ByteArrayInputStream(str.getBytes(cs));
    }
      // XML
    else if(UDF.RETURN_FORMAT_XML==format) {
      XMLConverter converter = new XMLConverter(pc.getTimeZone(),false);
            converter.setTimeZone(pc.getTimeZone());
            String str=converter.serialize(rtn);
            cs = getCharset(pc);
            is = new ByteArrayInputStream(str.getBytes(cs));
    }
    // Plain
    else if(UDF.RETURN_FORMAT_PLAIN==format) {
View Full Code Here

        String rtn=toString(value,null);
        if(rtn!=null)return rtn;
       
        try {
            if(value instanceof Struct) {
                return new ScriptConverter().serialize(value);
            }
            else if(value instanceof Array) {
                return new ScriptConverter().serialize(value);
            }
        }
        catch (ConverterException e) {}
        return defaultValue;
    }
View Full Code Here

  }
 
  public String getStrConfig()  {
    if(config!=null && strConfig==null) {
      try {
        strConfig=new ScriptConverter().serialize(config);
      } catch (ConverterException e) {
        return "";
      }
    }
    return strConfig;
View Full Code Here

*/
public final class Serialize implements Function {
 
  public static String call(PageContext pc , Object o) throws PageException {
      try {
            return new ScriptConverter().serialize(o);
        } catch (ConverterException e) {
            throw Caster.toPageException(e);
        }
  }
View Full Code Here

TOP

Related Classes of railo.runtime.converter.ScriptConverter

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.