Package railo.runtime

Examples of railo.runtime.Component


    // column
    str=toString(cfc,prop,meta,"inversejoincolumn",data);
   
    // build fkcolumn name
    if(Util.isEmpty(str,true)) {
      Component other = loadForeignCFC(pc, cfc, prop, meta,data);
      if(other!=null){
        boolean isClass=Util.isEmpty(other.getExtends());
        // MZ: Recursive search for persistent mappedSuperclass properties
        Property[] _props=getProperties(pc,other,dc,meta,isClass, true,data);
        PropertyCollection _propColl = splitJoins(cfc,new HashMap<String, PropertyCollection>(), _props,data);
        _props=_propColl.getProperties();
       
View Full Code Here


    if("many-to-one".equalsIgnoreCase(type))     otherType="one-to-many";
    else if("one-to-many".equalsIgnoreCase(type))   otherType="many-to-one";
    else return createM2MFKColumnName( cfc, prop, propColl,data);
   
    String feName = toString(cfc,prop,meta,"cfc",true,data);
    Component feCFC=data.getEntityByCFCName(feName, false);
    Property[] feProps = feCFC.getProperties(true);
   
    Property p;
    Component _cfc;
    for(int i=0;i<feProps.length;i++){
      p=feProps[i];

      // compare fieldType
      str=toString(feCFC,p,p.getDynamicAttributes(),"fieldtype",false,data);
      if(!otherType.equalsIgnoreCase(str)) continue;
     
      // compare cfc
      str=toString(feCFC,p,p.getDynamicAttributes(),"cfc",false,data);
      if(Util.isEmpty(str)) continue;
      _cfc=data.getEntityByCFCName(str, false);
      if(_cfc==null || !_cfc.equals(cfc))continue;
     
      // get fkcolumn
      str=toString(_cfc,p,p.getDynamicAttributes(),"fkcolumn",data);
      if(!Util.isEmpty(str)) return str;
     
View Full Code Here

      // cfc
      //createFKColumnName( cfc, prop, propColl);
     
      str = toString(cfc,prop,meta,"cfc",cfcRequired,data);
      if(!Util.isEmpty(str,true)){
        Component _cfc=data.getEntityByCFCName(str, false);
        str=HibernateCaster.getEntityName(_cfc);
        el.setAttribute("entity-name", str);
      }
    }
  }
View Full Code Here

  @Override
  public String toString() {
    if(coll instanceof Array)
      return "["+fromto()+"]";
    if(coll instanceof Component){
      Component c=(Component) coll;
      return "Component "+c.getName()+"("+c.getPageSource().getDisplayPath()+")";
    }
    if(coll instanceof Struct)
      return "{"+fromto()+"}";
    return FDCaster.serialize(coll);
  }
View Full Code Here

 
 
 
  @Override
  public void save(PageContext pc, Object obj,boolean forceInsert) throws PageException {
    Component cfc = HibernateCaster.toComponent(obj);
    //Session session = getSession(pc, cfc);
    String name = HibernateCaster.getEntityName(cfc);
    try {
      if(forceInsert)
        session().save(name, cfc);
View Full Code Here

    }
  }
 
  @Override
  public void reload(PageContext pc,Object obj) throws PageException {
    Component cfc = HibernateCaster.toComponent(obj);
    data.checkExistent(pc,cfc);
    //Session session = getSession(pc,cfc);
    session().refresh(cfc);
  }
View Full Code Here

    dc=null;
  }
 
  @Override
  public Component merge(PageContext pc, Object obj) throws PageException {
    Component cfc = HibernateCaster.toComponent(obj);
   
    data.checkExistent(pc,cfc);
   
    String name=HibernateCaster.getEntityName(cfc);
   
View Full Code Here

  }
 
  @Override
  public Array loadAsArray(PageContext pc, String name, String id) throws PageException {
    Array arr=CommonUtil.createArray();
    Component c = load(pc, name, id);
    if(c!=null)arr.append(c);
    return arr;
  }
View Full Code Here

  @Override
  public Component load(PageContext pc, String cfcName, String id) throws PageException {
    //Component cfc = create(pc,cfcName);
   
   
    Component cfc=data.getEngine().create(pc, this,cfcName,false);
   
    String name = HibernateCaster.getEntityName(cfc);
    Object obj=null;
    try{
      ClassMetadata metaData = getSessionFactory(pc).getClassMetadata(name);
View Full Code Here

  public Array loadByExampleAsArray(PageContext pc, Object obj) throws PageException {
    return CommonUtil.toArray(loadByExample(pc,obj, false));
  }
 
  private Object loadByExample(PageContext pc, Object obj,  boolean unique) throws PageException {
     Component cfc=HibernateCaster.toComponent(obj);
     ComponentScope scope = cfc.getComponentScope();
     String name=HibernateCaster.getEntityName(cfc);
     //Session session=getSession(pc, cfc);
    
     Object rtn=null;
    
View Full Code Here

TOP

Related Classes of railo.runtime.Component

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.