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

项目:AvoinApotti    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:AvoinApotti    文件:LocationMultipleSelectDialogImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations(String name)
{


    StringBuilder hqlBuilder = new StringBuilder("from Organisation as org where org.type.id not in (" +    getInvalidTypes()+  ") and org.isActive = 1 and org.isRIE is null  ");
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String and = "and ";

    if (name!=null && name.length()>0)
    {
        hqlBuilder.append(and);
        hqlBuilder.append(" upper(org.name) like :cName ");
        and = "and ";
        paramNames.add("cName");
        paramValues.add("%"+name.toUpperCase()+"%");
    }

    hqlBuilder.append(" order by upper(org.name)");

    List dos = getDomainFactory().find(hqlBuilder.toString(),paramNames,paramValues);

    if (dos == null || dos.size() == 0)
        return null;

    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos); 

}
项目:AvoinApotti    文件:ContractConfigurationImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations()
{
    String hql =  "from Organisation as org where (org.type.id not in (" +
            getInvalidTypes()+
            ") and org.isActive = 1 and org.isRIE is null) order by upper(org.name)";

    List<?> dos = getDomainFactory().find(hql);

    if (dos == null || dos.size()==0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos);
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public OrganisationLiteVoCollection listOrganisation() 
{
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:AvoinApotti    文件:ClinicListImpl.java   
public OrganisationLiteVo getOrganisationByLocation(Integer locationId) 
{
    if(locationId == null)
        throw new CodingRuntimeException("Cannot get Organisation by null location id.");

    Integer parentLocationId = getParentLocation(locationId);

    Organisation org = getOrganisationFromLoc(parentLocationId);

    return org != null ? OrganisationLiteVoAssembler.create(org) : null;
}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:LocationMultipleSelectDialogImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations(String name)
{


    StringBuilder hqlBuilder = new StringBuilder("from Organisation as org where org.type.id not in (" +    getInvalidTypes()+  ") and org.isActive = 1 and org.isRIE is null  ");
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String and = "and ";

    if (name!=null && name.length()>0)
    {
        hqlBuilder.append(and);
        hqlBuilder.append(" org.upperName like :cName "); //WDEV-20219 upper(org.name)
        and = "and ";
        paramNames.add("cName");
        paramValues.add("%"+name.toUpperCase()+"%");
    }

    hqlBuilder.append(" order by org.upperName"); //WDEV-20219 upper(org.name)

    List dos = getDomainFactory().find(hqlBuilder.toString(),paramNames,paramValues);

    if (dos == null || dos.size() == 0)
        return null;

    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos); 

}
项目:openMAXIMS    文件:ContractConfigurationImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations()
{
    String hql =  "from Organisation as org where (org.type.id not in (" +
            getInvalidTypes()+
            ") and org.isActive = 1 and org.isRIE is null) order by org.upperName"; //WDEV-20219 upper(org.upperName)

    List<?> dos = getDomainFactory().find(hql);

    if (dos == null || dos.size()==0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public OrganisationLiteVoCollection listOrganisation() 
{
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public OrganisationLiteVo getOrganisationByLocation(Integer locationId) 
{
    if(locationId == null)
        throw new CodingRuntimeException("Cannot get Organisation by null location id.");

    Integer parentLocationId = getParentLocation(locationId);

    Organisation org = getOrganisationFromLoc(parentLocationId);

    return org != null ? OrganisationLiteVoAssembler.create(org) : null;
}
项目:openMAXIMS    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:LocationMultipleSelectDialogImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations(String name)
{


    StringBuilder hqlBuilder = new StringBuilder("from Organisation as org where org.type.id not in (" +    getInvalidTypes()+  ") and org.isActive = 1 and org.isRIE is null  ");
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String and = "and ";

    if (name!=null && name.length()>0)
    {
        hqlBuilder.append(and);
        hqlBuilder.append(" upper(org.name) like :cName ");
        and = "and ";
        paramNames.add("cName");
        paramValues.add("%"+name.toUpperCase()+"%");
    }

    hqlBuilder.append(" order by upper(org.name)");

    List dos = getDomainFactory().find(hqlBuilder.toString(),paramNames,paramValues);

    if (dos == null || dos.size() == 0)
        return null;

    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos); 

}
项目:openMAXIMS    文件:ContractConfigurationImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations()
{
    String hql =  "from Organisation as org where (org.type.id not in (" +
            getInvalidTypes()+
            ") and org.isActive = 1 and org.isRIE is null) order by upper(org.name)";

    List<?> dos = getDomainFactory().find(hql);

    if (dos == null || dos.size()==0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public OrganisationLiteVoCollection listOrganisation() 
{
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openMAXIMS    文件:ClinicListImpl.java   
public OrganisationLiteVo getOrganisationByLocation(Integer locationId) 
{
    if(locationId == null)
        throw new CodingRuntimeException("Cannot get Organisation by null location id.");

    Integer parentLocationId = getParentLocation(locationId);

    Organisation org = getOrganisationFromLoc(parentLocationId);

    return org != null ? OrganisationLiteVoAssembler.create(org) : null;
}
项目:openmaxims-linux    文件:DirectoryOfServiceAdminImpl.java   
public OrganisationLiteVoCollection listOrganisations() {
    String hql = "from Organisation as org where  (org.type is not null  and org.type.id not in (:gpp,:supp,:pct) and org.isActive = 1 and org.parentOrganisation is null) order by org.upperName asc ";
    List<?> list = getDomainFactory().find(hql,new String[]{"gpp","supp","pct"},new Object[]{OrganisationType.GPP.getId(),OrganisationType.SUPPLIER.getId(),OrganisationType.NHS_PCT.getId()});
    if (list == null || list.size() == 0)
        return null;
    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(list);
}
项目:openmaxims-linux    文件:LocationMultipleSelectDialogImpl.java   
public ims.core.vo.OrganisationLiteVoCollection listActiveOrganisations(String name)
{


    StringBuilder hqlBuilder = new StringBuilder("from Organisation as org where org.type.id not in (" +    getInvalidTypes()+  ") and org.isActive = 1 and org.isRIE is null  ");
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    String and = "and ";

    if (name!=null && name.length()>0)
    {
        hqlBuilder.append(and);
        hqlBuilder.append(" upper(org.name) like :cName ");
        and = "and ";
        paramNames.add("cName");
        paramValues.add("%"+name.toUpperCase()+"%");
    }

    hqlBuilder.append(" order by upper(org.name)");

    List dos = getDomainFactory().find(hqlBuilder.toString(),paramNames,paramValues);

    if (dos == null || dos.size() == 0)
        return null;

    return OrganisationLiteVoAssembler.createOrganisationLiteVoCollectionFromOrganisation(dos); 

}