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)); } }
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); }
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); }
/// <summary> /// {@inheritDoc} /// </summary> /// /* @SuppressWarnings("unchecked")*/ public virtual IList <VocabularyDomain> SelectVocabularyDomains( CodeSearchCriteria searchCriteria) { return((IList <VocabularyDomain>)HibernateTemplate.Execute( new HibernateCodeSetDao.Anonymous_C7(this, searchCriteria))); }
public Anonymous_C7(HibernateCodeSetDao hibernateCodeSetDao, CodeSearchCriteria searchCriteria) { outer_HibernateCodeSetDao = hibernateCodeSetDao; this.f_criteria = searchCriteria; }