Beispiel #1
0
 /// <summary> Retrieves in this ActionRightCollection object all ActionRightEntity objects which are related via a  relation of type 'm:n' with the passed in RoleEntity. All current elements in the collection are removed from the collection.</summary>
 /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if the retrieval succeeded, false otherwise</returns>
 public virtual bool GetMultiManyToManyUsingSystemRightAssignedToRoles(IEntity roleInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, int pageNumber, int pageSize)
 {
     if (!this.SuppressClearInGetMulti)
     {
         this.Clear();
     }
     return(DAOFactory.CreateActionRightDAO().GetMultiUsingSystemRightAssignedToRoles(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, roleInstance, null, pageNumber, pageSize));
 }
Beispiel #2
0
 /// <summary> Retrieves in this ActionRightCollection object all ActionRightEntity objects which are related via a  relation of type 'm:n' with the passed in RoleEntity. All current elements in the collection are removed from the collection.</summary>
 /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
 /// <returns>true if the retrieval succeeded, false otherwise</returns>
 public bool GetMultiManyToManyUsingSystemRightAssignedToRoles(IEntity roleInstance, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath prefetchPathToUse)
 {
     if (!this.SuppressClearInGetMulti)
     {
         this.Clear();
     }
     return(DAOFactory.CreateActionRightDAO().GetMultiUsingSystemRightAssignedToRoles(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, roleInstance, prefetchPathToUse, 0, 0));
 }
Beispiel #3
0
        /// <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(ActionRightFieldIndex fieldIndex, IExpression expressionToExecute, AggregateFunction aggregateToApply, IPredicate filter, IRelationCollection relations, IGroupByCollection groupByClause)
        {
            EntityFields fields = new EntityFields(1);

            fields[0] = EntityFieldFactory.Create(fieldIndex);
            if ((fields[0].ExpressionToApply == null) || (expressionToExecute != null))
            {
                fields[0].ExpressionToApply = expressionToExecute;
            }
            if ((fields[0].AggregateFunctionToApply == AggregateFunction.None) || (aggregateToApply != AggregateFunction.None))
            {
                fields[0].AggregateFunctionToApply = aggregateToApply;
            }
            return(DAOFactory.CreateActionRightDAO().GetScalar(fields, this.Transaction, filter, relations, groupByClause));
        }
Beispiel #4
0
 /// <summary>Creats a new DAO instance so code which is in the base class can still use the proper DAO object.</summary>
 protected override IDao CreateDAOInstance()
 {
     return(DAOFactory.CreateActionRightDAO());
 }
Beispiel #5
0
        /// <summary> Retrieves Entity rows in a datatable which match the specified filter. It will always create a new connection to the database.</summary>
        /// <param name="selectFilter">A predicate or predicate expression which should be used as filter for the entities to retrieve.</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="relations">The set of relations to walk to construct to total query.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>DataTable with the rows requested.</returns>
        public static DataTable GetMultiAsDataTable(IPredicate selectFilter, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, int pageNumber, int pageSize)
        {
            ActionRightDAO dao = DAOFactory.CreateActionRightDAO();

            return(dao.GetMultiAsDataTable(maxNumberOfItemsToReturn, sortClauses, selectFilter, relations, pageNumber, pageSize));
        }