Beispiel #1
0
 internal void ConstrainOnBusinessNameIfRequired(ICriteria criteria,
                                                 CodeSearchCriteria searchCriteria)
 {
     if (!Ca.Infoway.Messagebuilder.StringUtils.IsEmpty(searchCriteria.BusinessName))
     {
         criteria.Add(NHibernate.Criterion.Restrictions.Like("businessName", searchCriteria.BusinessName.Trim(), NHibernate.Criterion.MatchMode.Anywhere));
     }
 }
Beispiel #2
0
        public void TestFindVocabularyDomainsByPartialTypeName()
        {
            this.factory.CreateVocabularyDomain(typeof(AcknowledgementCondition));
            this.factory.CreateVocabularyDomain(typeof(AcknowledgementType));
            this.factory.CreateVocabularyDomain(typeof(ActCode));
            this.factory.CreateVocabularyDomain(typeof(AdministrativeGender));

            CodeSearchCriteria searchCriteria = new CodeSearchCriteria();

            searchCriteria.Type = "Ac";
            IList <VocabularyDomain> vocabularyDomains = this.dao
                                                         .SelectVocabularyDomains(searchCriteria);

            NUnit.Framework.Assert.IsNotNull(vocabularyDomains);
            NUnit.Framework.Assert.AreEqual(3, vocabularyDomains.Count);
        }
Beispiel #3
0
        public void TestFindVocabularyDomainsByPartialDescription()
        {
            this.factory.CreateVocabularyDomain(typeof(AcknowledgementCondition),
                                                "Bbaaa", "Ddeee");
            this.factory.CreateVocabularyDomain(typeof(AcknowledgementType), "Bbaaa",
                                                "Ddeee");
            this.factory.CreateVocabularyDomain(typeof(ActCode), "Bbaaa", "Ddeee");
            this.factory.CreateVocabularyDomain(typeof(AdministrativeGender),
                                                "Other", "Other");

            CodeSearchCriteria searchCriteria = new CodeSearchCriteria();

            searchCriteria.Description = "Dd";
            IList <VocabularyDomain> vocabularyDomains = this.dao
                                                         .SelectVocabularyDomains(searchCriteria);

            NUnit.Framework.Assert.IsNotNull(vocabularyDomains);
            NUnit.Framework.Assert.AreEqual(3, vocabularyDomains.Count);
        }
Beispiel #4
0
 /// <summary>
 /// {@inheritDoc}
 /// </summary>
 ///
 /* @SuppressWarnings("unchecked")*/
 public virtual IList <VocabularyDomain> SelectVocabularyDomains(
     CodeSearchCriteria searchCriteria)
 {
     return((IList <VocabularyDomain>)HibernateTemplate.Execute(
                new HibernateCodeSetDao.Anonymous_C7(this, searchCriteria)));
 }
Beispiel #5
0
 public Anonymous_C7(HibernateCodeSetDao hibernateCodeSetDao, CodeSearchCriteria searchCriteria)
 {
     outer_HibernateCodeSetDao = hibernateCodeSetDao;
     this.f_criteria           = searchCriteria;
 }