Ejemplo n.º 1
0
        private void AddExclusionsIfRequired(ICriteria criteria,
                                             CodeSystemSearchCriteria searchCriteria)
        {
            String nameExclusion = searchCriteria.NameStartsWithExclusion;

            if (Ca.Infoway.Messagebuilder.StringUtils.IsNotBlank(nameExclusion))
            {
                criteria.Add(NHibernate.Criterion.Restrictions.Not(NHibernate.Criterion.Restrictions.Like("name",
                                                                                                          nameExclusion, NHibernate.Criterion.MatchMode.Start)));
            }

            String oidExclusion = searchCriteria.OidStartsWithExclusion;

            if (Ca.Infoway.Messagebuilder.StringUtils.IsNotBlank(oidExclusion))
            {
                criteria.Add(NHibernate.Criterion.Restrictions.Not(NHibernate.Criterion.Restrictions.Like("oid",
                                                                                                          oidExclusion, NHibernate.Criterion.MatchMode.Start)));
            }

            ICollection <String> oidExlusions = searchCriteria.OidExlusions;

            if (Ca.Infoway.Messagebuilder.CollUtils.IsNotEmpty(oidExlusions))
            {
//				criteria
//                        .Add(NHibernate.Criterion.Restrictions.Not(NHibernate.Criterion.Restrictions.In("oid", oidExlusions.Array())));
            }
        }
Ejemplo n.º 2
0
 public Anonymous_C5(HibernateCodeSetDao hibernateCodeSetDao, CodeSystemSearchCriteria searchCriteria,
                     int startRow, int endRow)
 {
     outer_HibernateCodeSetDao = hibernateCodeSetDao;
     this.f_criteria           = searchCriteria;
     this.f_row  = startRow;
     this.f_row2 = endRow;
 }
Ejemplo n.º 3
0
        internal ICriteria CreateStandardCodeSystemCriteria(
            CodeSystemSearchCriteria searchCriteria, ISession session)
        {
            ICriteria criteria = session.CreateCriteria(typeof(CodeSystem));

            AddOidRestrictionIfRequired(criteria, searchCriteria.Oid);
            AddNameRestrictionIfRequired(criteria, searchCriteria.Name);
            AddDescriptionRestrictionIfRequired(criteria, searchCriteria.Description);
            AddExclusionsIfRequired(criteria, searchCriteria);
            return(criteria);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// {@inheritDoc}
 /// </summary>
 ///
 /* @SuppressWarnings("unchecked")*/
 public virtual int CountCodeSystems(CodeSystemSearchCriteria searchCriteria)
 {
     return(((Int32?)HibernateTemplate.Execute(new HibernateCodeSetDao.Anonymous_C4(this, searchCriteria))).Value);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// {@inheritDoc}
 /// </summary>
 ///
 /* @SuppressWarnings("unchecked")*/
 public virtual IList <CodeSystem> FindCodeSystems(
     CodeSystemSearchCriteria searchCriteria, int startRow,
     int endRow)
 {
     return((IList <CodeSystem>)HibernateTemplate.ExecuteFind(new HibernateCodeSetDao.Anonymous_C5(this, searchCriteria, startRow, endRow)));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// {@inheritDoc}
 /// </summary>
 ///
 public virtual IList <CodeSystem> FindCodeSystems(
     CodeSystemSearchCriteria searchCriteria)
 {
     return(FindCodeSystems(searchCriteria, -1, -1));
 }
Ejemplo n.º 7
0
 public Anonymous_C4(HibernateCodeSetDao hibernateCodeSetDao, CodeSystemSearchCriteria searchCriteria)
 {
     outer_HibernateCodeSetDao = hibernateCodeSetDao;
     this.f_criteria           = searchCriteria;
 }