/// <summary>Creates the specified field on the position indexInResultset in the resultset.</summary>
 /// <param name="fieldToDefine">The specification of the field to create.</param>
 /// <param name="indexInResultset">The position in the resultset where the field will be created on</param>
 /// <param name="alias">The alias to use for this field in the resultset</param>
 /// <param name="entityAlias">The alias to use for the entity this field belongs to. Required to specify multiple times the same entity in a typed list</param>
 /// <param name="aggregateFunctionToApply">the aggregate function to apply to this field.</param>
 public void DefineField(ProductSectionFieldIndex fieldToDefine, int indexInResultset, string alias, string entityAlias, AggregateFunction aggregateFunctionToApply)
 {
     IEntityField2 fieldToAdd = EntityFieldFactory.Create(fieldToDefine);
     fieldToAdd.Alias = alias;
     fieldToAdd.ObjectAlias = entityAlias;
     fieldToAdd.AggregateFunctionToApply = aggregateFunctionToApply;
     base[indexInResultset] = fieldToAdd;
 }
 /// <summary>Returns true if the original value for the field with the fieldIndex passed in, read from the persistent storage was NULL, false otherwise.
 /// Should not be used for testing if the current value is NULL, use <see cref="TestCurrentFieldValueForNull"/> for that.</summary>
 /// <param name="fieldIndex">Index of the field to test if that field was NULL in the persistent storage</param>
 /// <returns>true if the field with the passed in index was NULL in the persistent storage, false otherwise</returns>
 public bool TestOriginalFieldValueForNull(ProductSectionFieldIndex fieldIndex)
 {
     return base.Fields[(int)fieldIndex].IsNull;
 }
 /// <summary>Creates the specified field on the position indexInResultset in the resultset.</summary>
 /// <param name="fieldToDefine">The specification of the field to create.</param>
 /// <param name="indexInResultset">The position in the resultset where the field will be created on</param>
 /// <param name="alias">The alias to use for this field in the resultset</param>
 /// <param name="entityAlias">The alias to use for the entity this field belongs to. Required to specify multiple times the same entity in a typed list</param>
 public void DefineField(ProductSectionFieldIndex fieldToDefine, int indexInResultset, string alias, string entityAlias)
 {
     DefineField(fieldToDefine, indexInResultset, alias, entityAlias, AggregateFunction.None);
 }
 /// <summary>Creates a new sort clause for the ProductSectionEntity field specified.</summary>
 public static ISortClause Create(ProductSectionFieldIndex fieldToSort, SortOperator operatorToUse, string objectAlias)
 {
     return new SortClause(EntityFieldFactory.Create(fieldToSort), null, operatorToUse, objectAlias);
 }
 /// <summary>Returns true if the current value for the field with the fieldIndex passed in represents null/not defined, false otherwise.
 /// Should not be used for testing if the original value (read from the db) is NULL</summary>
 /// <param name="fieldIndex">Index of the field to test if its currentvalue is null/undefined</param>
 /// <returns>true if the field's value isn't defined yet, false otherwise</returns>
 public bool TestCurrentFieldValueForNull(ProductSectionFieldIndex fieldIndex)
 {
     return base.CheckIfCurrentFieldValueIsNull((int)fieldIndex);
 }
 /// <summary>FieldBetweenPredicate factory for ProductSectionEntity.</summary>
 public static FieldBetweenPredicate Between(ProductSectionFieldIndex indexOfField, object valueBegin, object valueEnd, string objectAlias, bool negate)
 {
     return new FieldBetweenPredicate(EntityFieldFactory.Create(indexOfField), null, valueBegin, valueEnd, objectAlias, negate);
 }
        /// <summary> Creates a new IEntityField2 instance for usage in the EntityFields object for the ProductSectionEntity. 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(ProductSectionFieldIndex fieldIndex)
        {
            IEntityField2 fieldToReturn = null;
            switch(fieldIndex)
            {
                case ProductSectionFieldIndex.Id:
                    fieldToReturn = new EntityField2("Id", "ProductSectionEntity", typeof(System.Int32), TypeDefaultValue.GetDefaultValue(typeof(System.Int32)), true, (int)fieldIndex, 0, 0, 10, false, true, false);
                    break;
                case ProductSectionFieldIndex.ParentSectionId:
                    fieldToReturn = new EntityField2("ParentSectionId", "ProductSectionEntity", typeof(System.Int32), TypeDefaultValue.GetDefaultValue(typeof(System.Int32)), false, (int)fieldIndex, 0, 0, 10, true, false, true);
                    break;
                case ProductSectionFieldIndex.Uri:
                    fieldToReturn = new EntityField2("Uri", "ProductSectionEntity", typeof(System.String), TypeDefaultValue.GetDefaultValue(typeof(System.String)), false, (int)fieldIndex, 255, 0, 0, false, false, true);
                    break;
                case ProductSectionFieldIndex.Name:
                    fieldToReturn = new EntityField2("Name", "ProductSectionEntity", typeof(System.String), TypeDefaultValue.GetDefaultValue(typeof(System.String)), false, (int)fieldIndex, 100, 0, 0, false, false, true);
                    break;

            }
            return fieldToReturn;
        }
 /// <summary>FieldLikePredicate factory for ProductSectionEntity.</summary>
 public static FieldLikePredicate Like(ProductSectionFieldIndex indexOfField, string pattern)
 {
     return new FieldLikePredicate(EntityFieldFactory.Create(indexOfField), null, pattern);
 }
 /// <summary>FieldLikePredicate factory for ProductSectionEntity.</summary>
 public static FieldLikePredicate Like(ProductSectionFieldIndex indexOfField, string objectAlias, string pattern, bool negate)
 {
     return new FieldLikePredicate(EntityFieldFactory.Create(indexOfField), null, objectAlias, pattern, negate);
 }
 /// <summary>FieldCompareValuePredicate factory for ProductSectionEntity.</summary>
 public static FieldCompareValuePredicate CompareValue(ProductSectionFieldIndex indexOfField, ComparisonOperator operatorToUse, object value, string objectAlias, bool negate)
 {
     return new FieldCompareValuePredicate(EntityFieldFactory.Create(indexOfField), null, operatorToUse, value, objectAlias, negate);
 }
 /// <summary>FieldCompareRangePredicate factory for ProductSectionEntity.</summary>
 public static FieldCompareRangePredicate CompareRange(ProductSectionFieldIndex indexOfField, string objectAlias, bool negate, params object[] values)
 {
     return new FieldCompareRangePredicate(EntityFieldFactory.Create(indexOfField), null, objectAlias, negate, values);
 }
 /// <summary>FieldCompareNullPredicate factory for ProductSectionEntity.</summary>
 public static FieldCompareNullPredicate CompareNull(ProductSectionFieldIndex indexOfField, string objectAlias, bool negate)
 {
     return new FieldCompareNullPredicate(EntityFieldFactory.Create(indexOfField), null, objectAlias, negate);
 }
 /// <summary>FieldCompareNullPredicate factory for ProductSectionEntity.</summary>
 public static FieldCompareNullPredicate CompareNull(ProductSectionFieldIndex indexOfField)
 {
     return new FieldCompareNullPredicate(EntityFieldFactory.Create(indexOfField), null);
 }
 /// <summary>FieldCompareExpressionPredicate factory for ProductSectionEntity.</summary>
 public static FieldCompareExpressionPredicate CompareExpression(ProductSectionFieldIndex indexOfField, ComparisonOperator operatorToUse, IExpression expressionToCompareWith, string objectAlias, bool negate)
 {
     return new FieldCompareExpressionPredicate(EntityFieldFactory.Create(indexOfField), null, operatorToUse, expressionToCompareWith, objectAlias, negate);
 }