protected internal virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledEntityStatement CreateCompiledEntityStatement() { Net.Vpc.Upa.Persistence.ExpressionCompilerConfig config = new Net.Vpc.Upa.Persistence.ExpressionCompilerConfig(); string alias = null; string ent = null; if (query is Net.Vpc.Upa.Expressions.Select) { Net.Vpc.Upa.Expressions.Select d = (Net.Vpc.Upa.Expressions.Select)query; string entityAlias = d.GetEntityAlias(); Net.Vpc.Upa.Expressions.EntityName entityName = (d.GetEntity() is Net.Vpc.Upa.Expressions.EntityName) ? ((Net.Vpc.Upa.Expressions.EntityName)d.GetEntity()) : null; if (entityAlias != null) { alias = entityAlias; ent = entityName == null ? null : entityName.GetName(); } else { ent = entityName == null ? null : entityName.GetName(); alias = ent; } } if (alias != null) { config.SetThisAlias(alias); } config.SetExpandFields(false); config.SetExpandEntityFilter(false); config.SetValidate(false); return((Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledEntityStatement)context.GetPersistenceUnit().GetExpressionManager().CompileExpression(query, config)); }
public override string GetEntityAlias() { return(entityAlias == null ? (entity == null ? null : entity.GetName()) : entityAlias); }
protected internal virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledEntityName CompileEntityName(Net.Vpc.Upa.Expressions.EntityName v, Net.Vpc.Upa.Impl.Uql.ExpressionDeclarationList declarations) { if (v == null) { return(null); } Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledEntityName s = new Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledEntityName(v.GetName()); // s.setDeclarationList(declarations); return(s); }