Beispiel #1
0
 public virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.DefaultCompiledExpression CompileExpression(Net.Vpc.Upa.Expressions.Expression expression, Net.Vpc.Upa.Persistence.ExpressionCompilerConfig config)
 {
     if (/*IsLoggable=*/ true)
     {
     }
     //expected api 1.2.1
     //            log.log(Level.FINE,"Compiling Expression " + expression);
     if (expression == null)
     {
         throw new System.NullReferenceException("Null Expression could not be compiled");
     }
     Net.Vpc.Upa.Impl.Uql.ExpressionDeclarationList dec = new Net.Vpc.Upa.Impl.Uql.DefaultExpressionDeclarationList(null);
     if (config.GetAliasToEntityContext() != null)
     {
         foreach (System.Collections.Generic.KeyValuePair <string, string> entry in new System.Collections.Generic.HashSet <System.Collections.Generic.KeyValuePair <string, string> >(config.GetAliasToEntityContext()))
         {
             // check entity existence
             persistenceUnit.GetEntity((entry).Value);
             dec.ExportDeclaration((entry).Key, Net.Vpc.Upa.Impl.Uql.DecObjectType.ENTITY, (entry).Value, null);
         }
     }
     Net.Vpc.Upa.Impl.Uql.Compiledexpression.DefaultCompiledExpression s = TranslateAny(expression, dec);
     if (s is Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryStatement)
     {
         Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryStatement qs = (Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryStatement)s;
         System.Collections.Generic.IList <Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryField> fields = qs.GetFields();
         for (int i = 0; i < (fields).Count; i++)
         {
             Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledQueryField field = fields[i];
             field.SetIndex(i);
         }
     }
     return(s);
 }
 public DefaultExpressionDeclarationList(Net.Vpc.Upa.Impl.Uql.DefaultExpressionDeclarationList parentDeclaration)
 {
     exportedDeclarations   = new System.Collections.Generic.List <Net.Vpc.Upa.Impl.Uql.ExpressionDeclaration>();
     this.parentDeclaration = parentDeclaration;
 }
 public virtual void SetParentDeclaration(Net.Vpc.Upa.Impl.Uql.DefaultExpressionDeclarationList parentDeclaration)
 {
     this.parentDeclaration = parentDeclaration;
 }