/// <summary>Gets a scalar value, calculated with the aggregate and expression specified. the field index specified is the field the expression and aggregate are applied on.</summary>
        /// <param name="fieldIndex">Field index of field to which to apply the aggregate function and expression</param>
        /// <param name="expressionToExecute">The expression to execute. Can be null</param>
        /// <param name="aggregateToApply">Aggregate function to apply. </param>
        /// <param name="filter">The filter to apply to retrieve the scalar</param>
        /// <param name="relations">The relations to walk</param>
        /// <param name="groupByClause">The groupby clause to apply to retrieve the scalar</param>
        /// <returns>the scalar value requested</returns>
        public virtual object GetScalar(EmployeeFieldIndex fieldIndex, IExpression expressionToExecute, AggregateFunction aggregateToApply, IPredicate filter, IRelationCollection relations, IGroupByCollection groupByClause)
        {
            EntityFields fields = new EntityFields(1);

            fields[0] = EntityFieldFactory.Create(fieldIndex);
            if (expressionToExecute != null)
            {
                fields[0].ExpressionToApply = expressionToExecute;
            }
            if (aggregateToApply != AggregateFunction.None)
            {
                fields[0].AggregateFunctionToApply = aggregateToApply;
            }
            return(DAOFactory.CreateEmployeeDAO().GetScalar(fields, this.Transaction, filter, relations, groupByClause));
        }
 /// <summary>Gets a scalar value, calculated with the aggregate and expression specified. the field index specified is the field the expression and aggregate are applied on.</summary>
 /// <param name="fieldIndex">Field index of field to which to apply the aggregate function and expression</param>
 /// <param name="expressionToExecute">The expression to execute. Can be null</param>
 /// <param name="aggregateToApply">Aggregate function to apply. </param>
 /// <param name="filter">The filter to apply to retrieve the scalar</param>
 /// <param name="groupByClause">The groupby clause to apply to retrieve the scalar</param>
 /// <returns>the scalar value requested</returns>
 public object GetScalar(EmployeeFieldIndex fieldIndex, IExpression expressionToExecute, AggregateFunction aggregateToApply, IPredicate filter, IGroupByCollection groupByClause)
 {
     return(GetScalar(fieldIndex, expressionToExecute, aggregateToApply, filter, null, groupByClause));
 }
 /// <summary>Gets a scalar value, calculated with the aggregate and expression specified. the field index specified is the field the expression and aggregate are applied on.</summary>
 /// <param name="fieldIndex">Field index of field to which to apply the aggregate function and expression</param>
 /// <param name="expressionToExecute">The expression to execute. Can be null</param>
 /// <param name="aggregateToApply">Aggregate function to apply. </param>
 /// <returns>the scalar value requested</returns>
 public object GetScalar(EmployeeFieldIndex fieldIndex, IExpression expressionToExecute, AggregateFunction aggregateToApply)
 {
     return(GetScalar(fieldIndex, expressionToExecute, aggregateToApply, null, null, null));
 }
 /// <summary>Gets a scalar value, calculated with the aggregate. the field index specified is the field the aggregate are applied on.</summary>
 /// <param name="fieldIndex">Field index of field to which to apply the aggregate function and expression</param>
 /// <param name="aggregateToApply">Aggregate function to apply. </param>
 /// <returns>the scalar value requested</returns>
 public object GetScalar(EmployeeFieldIndex fieldIndex, AggregateFunction aggregateToApply)
 {
     return(GetScalar(fieldIndex, null, aggregateToApply, null, null, null));
 }
Ejemplo n.º 5
0
 /// <summary> Creates a new IEntityField2 instance for usage in the EntityFields object for the EmployeeEntity. Which EntityField is created is specified by fieldIndex</summary>
 /// <param name="fieldIndex">The field which IEntityField2 instance should be created</param>
 /// <returns>The IEntityField2 instance for the field specified in fieldIndex</returns>
 public static IEntityField2 Create(EmployeeFieldIndex fieldIndex)
 {
     return(new EntityField2(FieldInfoProviderSingleton.GetInstance().GetFieldInfo("EmployeeEntity", (int)fieldIndex)));
 }
Ejemplo n.º 6
0
 /// <summary>Creates a new sort clause for the EmployeeEntity field specified.</summary>
 public static ISortClause Create(EmployeeFieldIndex fieldToSort, SortOperator operatorToUse, string objectAlias)
 {
     return(new SortClause(EntityFieldFactory.Create(fieldToSort), operatorToUse, objectAlias));
 }
Ejemplo n.º 7
0
        /// <summary>Creates a new IEntityField instance for usage in the EntityFields object for the EmployeeEntity.  Which EntityField is created is specified by fieldIndex</summary>
        /// <param name="fieldIndex">The field which IEntityField instance should be created</param>
        /// <returns>The IEntityField instance for the field specified in fieldIndex</returns>
        public static IEntityField Create(EmployeeFieldIndex fieldIndex)
        {
            IFieldInfo info = FieldInfoProviderSingleton.GetInstance().GetFieldInfo("EmployeeEntity", (int)fieldIndex);

            return(new EntityField(info, PersistenceInfoProviderSingleton.GetInstance().GetFieldPersistenceInfo(info.ContainingObjectName, info.Name)));
        }