Examples of Relation


Examples of siena.core.Relation

    for(Object obj:objects){
      Class<?> clazz = obj.getClass();
      ClassInfo info = ClassInfo.getClassInfo(clazz);
     
      if(info.hasAggregator){
        Relation rel = (Relation)Util.readField(obj, info.aggregator);
        if(rel != null && rel.mode == RelationMode.AGGREGATION){
          ClassInfo parentInfo = ClassInfo.getClassInfo(rel.target.getClass());
          Key parentKey = GaeMappingUtils.makeKey(parentInfo, rel.target);
          _updateBuildMaps(entitiesMap, objectsMap, keysMap,
              obj, parentKey, parentInfo, (Field)rel.discriminator);
View Full Code Here

Examples of siena.core.Relation

    }

    if(aggregs.size() == 1){
      // aggregators
      QueryAggregated aggreg = aggregs.get(0);     
      Relation rel =
        new Relation(RelationMode.AGGREGATION, aggreg.aggregator, aggreg.field);
      Util.setField(obj, info.aggregator, rel);
    }
    else if(aggregs.size() > 1){
      throw new SienaException("Only one aggregation per query allowed");
    }
View Full Code Here

Examples of siena.core.Relation

    }
   
    if(aggregs.size() == 1){
      QueryAggregated aggreg = aggregs.get(0);
     
      Relation rel =
        new Relation(RelationMode.AGGREGATION, aggreg.aggregator, aggreg.field);
      for(T obj: objs){
        Util.setField(obj, info.aggregator, rel);
      }     
    }
    else if(aggregs.size() > 1){
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.