Exemple #1
0
        public ONCollection QueryByOid(ONOid oid, ONDisplaySet displaySet)
        {
            //Create filters
            ONFilterList lOnFilterList = new ONFilterList();

            lOnFilterList.Add("QueryByOid", new QueryByOidFilter(oid));

            return(QueryByFilter(null, lOnFilterList, displaySet, null, null, 0));
        }
Exemple #2
0
        public ONDisplaySet(ONDisplaySet displaySet)
            : base()
        {
            ClassName = displaySet.ClassName;

            foreach (ONDisplaySetItem lDisplaySetItem in displaySet)
            {
                Add(new ONDisplaySetItem(lDisplaySetItem));
            }
        }
        /// <summary>Solves the filters defined in this class</summary>
        /// <param name="linkedTo">This parameter has the related instance to retrieve the requested instances</param>
        /// <param name="filters">This parameter has all the filters defined with this class</param>
        /// <param name="orderCriteria">This parameter has the name of the order criteria to add to SQL statement</param>
        /// <param name="startRowOID">This parameter has the OID necessary to start the search</param>
        /// <param name="blockSize">This parameter represents the number of instances to be returned</param>
        public override ONCollection QueryByFilter(ONLinkedToList linkedTo, ONFilterList filters, ONDisplaySet displaySet, string orderCriteria, ONOid startRowOID, int blockSize)
        {
            // OrderCriteria
            ONOrderCriteria lComparer = GetOrderCriteria(orderCriteria);

            // Horizontal visibility
            if (filters == null)
            {
                filters = new ONFilterList();
            }
            filters.Add("HorizontalVisibility", new NaveNodrizaHorizontalVisibility());

            // Linked To List
            if (linkedTo == null)
            {
                linkedTo = new ONLinkedToList();
            }

            // Call Data
            try
            {
                NaveNodrizaData lData       = new NaveNodrizaData(OnContext);
                ONCollection    lCollection = lData.ExecuteQuery(linkedTo, filters, displaySet, lComparer, startRowOID, blockSize);

                // OrderCriteria
                if (lComparer != null)
                {
                    lCollection.Sort(lComparer);
                }

                return(lCollection);
            }
            catch (Exception e)
            {
                if (e is ONException)
                {
                    throw e;
                }
                else
                {
                    string ltraceItem = "Error in query, Method: ExecuteQuery, Component: NaveNodrizaQuery";
                    if (e is ONSystemException)
                    {
                        ONSystemException lException = e as ONSystemException;
                        lException.addTraceInformation(ltraceItem);
                        throw lException;
                    }
                    throw new ONSystemException(e, ltraceItem);
                }
            }
        }
Exemple #4
0
        public ONCollection GetPopulation(ONDisplaySet displaySet, string orderCriteria, ONOid startRowOID, int blockSize)

        {
            return(QueryByFilter(null, null, displaySet, orderCriteria, startRowOID, blockSize));
        }
Exemple #5
0
 public abstract ONCollection QueryByFilter(ONLinkedToList linkedTo, ONFilterList filters, ONDisplaySet displaySet, string orderCriteria, ONOid startRowOID, int blockSize);
Exemple #6
0
 public ONCollection QueryByRelated(ONLinkedToList linkedTo, ONDisplaySet displaySet, string orderCriteria, ONOid startRowOID, int blockSize)
 {
     return(QueryByFilter(linkedTo, null, displaySet, orderCriteria, startRowOID, blockSize));
 }