Java 类ims.core.vo.domain.OrgLiteVoAssembler 实例源码

项目:AvoinApotti    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openMAXIMS    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:openMAXIMS    文件:NewOnwardReferralImpl.java   
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:AvoinApotti    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openMAXIMS    文件:PdsDomainHelperImpl.java   
@Override
public OrgLiteVo getPracticeByTaxonomyCode(String code, TaxonomyType type)
{
    String hql = "select org from Organisation as org left join org.codeMappings as tax left join tax.taxonomyName as lkp\r\n" + 
            "where (tax.taxonomyCode = :taxonomyCode and lkp.id = :type) order by org.id asc ";

    List<?> list = getDomainFactory().find(hql, new String[] {"taxonomyCode", "type"}, new Object[] {code, type.getID()});

    if(list != null && list.size() > 0)
        return OrgLiteVoAssembler.create((Organisation) list.get(0));

    return null;
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openMAXIMS    文件:ClientAddressImpl.java   
public OrgLiteVoCollection listLHOs()
{
    StringBuffer hql = new StringBuffer();
    hql.append(" from Organisation o");
    hql.append(" where");
    hql.append(" o.type.id = :lho and o.isActive = 1 order by o.name asc");

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(getDomainFactory().find(hql.toString(), new String[] { "lho" }, new Object[] { OrganisationType.LHO.getID() }));
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
@SuppressWarnings("unchecked")
public OrgLiteVoCollection listAllSuppliers() 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation org ";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " org.type.id = " + OrganisationType.SUPPLIER.getID());
    andStr = " and ";

    condStr.append(andStr + "org.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);   

    hql += " where ";
    hql += condStr.toString();

    List locations = factory.find(hql, markers, values, 1000);

    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(locations).sort();

}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public OrgLiteVoCollection listOrganisationsLite(OrgShortVo filter)
{
    List orgs = listDomOrganisation(filter);

    OrgLiteVoCollection voCollOrg = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
    voCollOrg.sort();
    return voCollOrg;
}
项目:AvoinApotti    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:AvoinApotti    文件:LocationStartupSelectionImpl.java   
@SuppressWarnings("unchecked")
private ims.core.vo.OrgLiteVoCollection listOrganizations(OrganisationRefVo organization) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);
    andStr = " and ";

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :PCT or o.type.id is null)");
    markers.add("PCT");
    values.add(getDomLookup(OrganisationType.NHS_PCT));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :SP or o.type.id is null)");
    markers.add("SP");
    values.add(getDomLookup(OrganisationType.SUPPLIER));
    andStr = " and ";

    if(organization == null)
    {
        condStr.append(andStr + " o.parentOrganisation is null");
        andStr = " and ";
    }
    else
    {
        condStr.append(andStr + " o.parentOrganisation.id = :parentOrg");
        markers.add("parentOrg");
        values.add(organization.getID_Organisation());
        andStr = " and ";
    }

    hql += " where ";
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);
    OrgLiteVoCollection result = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs).sort();     
    return result;
}
项目:AvoinApotti    文件:ReferralDetailsImpl.java   
public OrgLiteVoCollection listAllSuppliers()
{
    List orgs = getDomainFactory().find("from Organisation org where org.type.id = " + OrganisationType.SUPPLIER.getID() + "and org.isActive = " + Boolean.TRUE);
    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:openMAXIMS    文件:LocationStartupSelectionImpl.java   
@SuppressWarnings("unchecked")
private ims.core.vo.OrgLiteVoCollection listOrganizations(OrganisationRefVo organization) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);
    andStr = " and ";

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :PCT or o.type.id is null)");
    markers.add("PCT");
    values.add(getDomLookup(OrganisationType.NHS_PCT));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :SP or o.type.id is null)");
    markers.add("SP");
    values.add(getDomLookup(OrganisationType.SUPPLIER));
    andStr = " and ";

    if(organization == null)
    {
        condStr.append(andStr + " o.parentOrganisation is null");
        andStr = " and ";
    }
    else
    {
        condStr.append(andStr + " o.parentOrganisation.id = :parentOrg");
        markers.add("parentOrg");
        values.add(organization.getID_Organisation());
        andStr = " and ";
    }

    hql += " where ";
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);
    OrgLiteVoCollection result = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs).sort();     
    return result;
}
项目:openMAXIMS    文件:ReferralDetailsImpl.java   
public OrgLiteVoCollection listAllSuppliers()
{
    List<?> orgs = getDomainFactory().find("from Organisation org where org.type.id = " + OrganisationType.SUPPLIER.getID() + "and org.isActive = " + Boolean.TRUE);
    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
}
项目:openMAXIMS    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:openMAXIMS    文件:LocationStartupSelectionImpl.java   
@SuppressWarnings("unchecked")
private ims.core.vo.OrgLiteVoCollection listOrganizations(OrganisationRefVo organization) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);
    andStr = " and ";

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :PCT or o.type.id is null)");
    markers.add("PCT");
    values.add(getDomLookup(OrganisationType.NHS_PCT));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :SP or o.type.id is null)");
    markers.add("SP");
    values.add(getDomLookup(OrganisationType.SUPPLIER));
    andStr = " and ";

    if(organization == null)
    {
        condStr.append(andStr + " o.parentOrganisation is null");
        andStr = " and ";
    }
    else
    {
        condStr.append(andStr + " o.parentOrganisation.id = :parentOrg");
        markers.add("parentOrg");
        values.add(organization.getID_Organisation());
        andStr = " and ";
    }

    hql += " where ";
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);
    OrgLiteVoCollection result = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs).sort();     
    return result;
}
项目:openMAXIMS    文件:ReferralDetailsImpl.java   
public OrgLiteVoCollection listAllSuppliers()
{
    List orgs = getDomainFactory().find("from Organisation org where org.type.id = " + OrganisationType.SUPPLIER.getID() + "and org.isActive = " + Boolean.TRUE);
    return OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs);
}
项目:openmaxims-linux    文件:OrganisationAndLocationImpl.java   
public OrgLiteVo getOrgLiteByTaxonomyType(String extId, TaxonomyType taxonomyType)
{
    return OrgLiteVoAssembler.create(getDomOrganisationByTaxonomyType(extId, taxonomyType));
}
项目:openmaxims-linux    文件:LocationStartupSelectionImpl.java   
@SuppressWarnings("unchecked")
private ims.core.vo.OrgLiteVoCollection listOrganizations(OrganisationRefVo organization) 
{
    DomainFactory factory = getDomainFactory();

    String hql = " from Organisation o ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    List orgs = null;

    condStr.append(andStr + " o.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);
    andStr = " and ";

    condStr.append(andStr + " (o.type != :GP or o.type.id is null)");
    markers.add("GP");
    values.add(getDomLookup(OrganisationType.GPP));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :PCT or o.type.id is null)");
    markers.add("PCT");
    values.add(getDomLookup(OrganisationType.NHS_PCT));
    andStr = " and ";

    condStr.append(andStr + " (o.type != :SP or o.type.id is null)");
    markers.add("SP");
    values.add(getDomLookup(OrganisationType.SUPPLIER));
    andStr = " and ";

    if(organization == null)
    {
        condStr.append(andStr + " o.parentOrganisation is null");
        andStr = " and ";
    }
    else
    {
        condStr.append(andStr + " o.parentOrganisation.id = :parentOrg");
        markers.add("parentOrg");
        values.add(organization.getID_Organisation());
        andStr = " and ";
    }

    hql += " where ";
    hql += condStr.toString();

    orgs = factory.find(hql, markers, values);
    OrgLiteVoCollection result = OrgLiteVoAssembler.createOrgLiteVoCollectionFromOrganisation(orgs).sort();     
    return result;
}