Java 类ims.admin.vo.domain.AppImageVoAssembler 实例源码

项目:AvoinApotti    文件:ImageProvider.java   
public Image[] getAllImages()
{
    DomainFactory factory = getDomainFactory();
    List l = factory.find("from AppImage", 5000);
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(l).toIAppImageArray();
}
项目:AvoinApotti    文件:ImageProvider.java   
public Image getImage(int imageId)
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = (AppImage)factory.getDomainObject(AppImage.class, imageId);
    return AppImageVoAssembler.create(domImage);
}
项目:AvoinApotti    文件:NavigationImageSelectDialogImpl.java   
public ims.admin.vo.AppImageVo getImageById(Integer id)
{
    return AppImageVoAssembler.create((AppImage) getDomainFactory().getDomainObject(AppImage.class, id));
}
项目:AvoinApotti    文件:ImageAdminImpl.java   
public AppImageVoCollection listImages(AppImageVo filter) 
{
    DomainFactory factory = getDomainFactory();     
    StringBuffer cond = new StringBuffer();
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = "";

    if (filter != null)
    {
        if (filter.getImagePath() != null && filter.getImagePath().length() > 0)
        {
            cond.append(andStr + " upper(i.imagePath) like :path");
            names.add("path");
            values.add("%" + filter.getImagePath().toUpperCase() + "%");
            andStr = " and ";
        }
        if (filter.getIsSystem() != null)
        {
            cond.append(andStr + " i.isSystem = :system");
            names.add("system");
            values.add(filter.getIsSystem());
            andStr = " and ";
        }
        if (filter.getIsActive() == null || filter.getIsActive().booleanValue())
        {
            cond.append(andStr + " i.isActive = :isActive ");
            names.add("isActive");
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    String hql = " from AppImage i ";
    if (!andStr.equals(""))
    {
        hql += " where ";
        hql += cond.toString();
    }
    List images = factory.find(hql,names,values);

    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(images).sort();       
}
项目:AvoinApotti    文件:ImageAdminImpl.java   
public void deleteImage(AppImageVo image) throws ForeignKeyViolationException 
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = AppImageVoAssembler.extractAppImage(factory, image);
    factory.delete(domImage);
}
项目:AvoinApotti    文件:EventConfigurationImpl.java   
public AppImageVoCollection list16x16Icons(String name)
{
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(getDomainFactory().find("from AppImage as appImage where (appImage.height = :height and appImage.width = :width and appImage.imagePath like '%" + name + "%')", new String[]{"height", "width"}, new Object[]{16, 16}, 1000));
}
项目:openMAXIMS    文件:ImageProvider.java   
public Image[] getAllImages()
{
    DomainFactory factory = getDomainFactory();
    List l = factory.find("from AppImage", 5000);
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(l).toIAppImageArray();
}
项目:openMAXIMS    文件:ImageProvider.java   
public Image getImage(int imageId)
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = (AppImage)factory.getDomainObject(AppImage.class, imageId);
    return AppImageVoAssembler.create(domImage);
}
项目:openMAXIMS    文件:NavigationImageSelectDialogImpl.java   
public ims.admin.vo.AppImageVo getImageById(Integer id)
{
    return AppImageVoAssembler.create((AppImage) getDomainFactory().getDomainObject(AppImage.class, id));
}
项目:openMAXIMS    文件:ImageAdminImpl.java   
public AppImageVoCollection listImages(AppImageVo filter) 
{
    DomainFactory factory = getDomainFactory();     
    StringBuffer cond = new StringBuffer();
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = "";

    if (filter != null)
    {
        if (filter.getImagePath() != null && filter.getImagePath().length() > 0)
        {
            cond.append(andStr + " upper(i.imagePath) like :path");
            names.add("path");
            values.add("%" + filter.getImagePath().toUpperCase() + "%");
            andStr = " and ";
        }
        if (filter.getIsSystem() != null)
        {
            cond.append(andStr + " i.isSystem = :system");
            names.add("system");
            values.add(filter.getIsSystem());
            andStr = " and ";
        }
        if (filter.getIsActive() == null || filter.getIsActive().booleanValue())
        {
            cond.append(andStr + " i.isActive = :isActive ");
            names.add("isActive");
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    String hql = " from AppImage i ";
    if (!andStr.equals(""))
    {
        hql += " where ";
        hql += cond.toString();
    }
    List images = factory.find(hql,names,values);

    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(images).sort();       
}
项目:openMAXIMS    文件:ImageAdminImpl.java   
public void deleteImage(AppImageVo image) throws ForeignKeyViolationException 
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = AppImageVoAssembler.extractAppImage(factory, image);
    factory.delete(domImage);
}
项目:openMAXIMS    文件:EventConfigurationImpl.java   
public AppImageVoCollection list16x16Icons(String name)
{
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(getDomainFactory().find("from AppImage as appImage where (appImage.height = :height and appImage.width = :width and appImage.imagePath like '%" + name + "%')", new String[]{"height", "width"}, new Object[]{16, 16}, 1000));
}
项目:openMAXIMS    文件:ImageProvider.java   
public Image[] getAllImages()
{
    DomainFactory factory = getDomainFactory();
    List l = factory.find("from AppImage", 5000);
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(l).toIAppImageArray();
}
项目:openMAXIMS    文件:ImageProvider.java   
public Image getImage(int imageId)
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = (AppImage)factory.getDomainObject(AppImage.class, imageId);
    return AppImageVoAssembler.create(domImage);
}
项目:openMAXIMS    文件:NavigationImageSelectDialogImpl.java   
public ims.admin.vo.AppImageVo getImageById(Integer id)
{
    return AppImageVoAssembler.create((AppImage) getDomainFactory().getDomainObject(AppImage.class, id));
}
项目:openMAXIMS    文件:ImageAdminImpl.java   
public AppImageVoCollection listImages(AppImageVo filter) 
{
    DomainFactory factory = getDomainFactory();     
    StringBuffer cond = new StringBuffer();
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = "";

    if (filter != null)
    {
        if (filter.getImagePath() != null && filter.getImagePath().length() > 0)
        {
            cond.append(andStr + " upper(i.imagePath) like :path");
            names.add("path");
            values.add("%" + filter.getImagePath().toUpperCase() + "%");
            andStr = " and ";
        }
        if (filter.getIsSystem() != null)
        {
            cond.append(andStr + " i.isSystem = :system");
            names.add("system");
            values.add(filter.getIsSystem());
            andStr = " and ";
        }
        if (filter.getIsActive() == null || filter.getIsActive().booleanValue())
        {
            cond.append(andStr + " i.isActive = :isActive ");
            names.add("isActive");
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    String hql = " from AppImage i ";
    if (!andStr.equals(""))
    {
        hql += " where ";
        hql += cond.toString();
    }
    List images = factory.find(hql,names,values);

    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(images).sort();       
}
项目:openMAXIMS    文件:ImageAdminImpl.java   
public void deleteImage(AppImageVo image) throws ForeignKeyViolationException 
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = AppImageVoAssembler.extractAppImage(factory, image);
    factory.delete(domImage);
}
项目:openMAXIMS    文件:EventConfigurationImpl.java   
public AppImageVoCollection list16x16Icons(String name)
{
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(getDomainFactory().find("from AppImage as appImage where (appImage.height = :height and appImage.width = :width and appImage.imagePath like '%" + name + "%')", new String[]{"height", "width"}, new Object[]{16, 16}, 1000));
}
项目:openmaxims-linux    文件:ImageProvider.java   
public Image[] getAllImages()
{
    DomainFactory factory = getDomainFactory();
    List l = factory.find("from AppImage", 5000);
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(l).toIAppImageArray();
}
项目:openmaxims-linux    文件:ImageProvider.java   
public Image getImage(int imageId)
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = (AppImage)factory.getDomainObject(AppImage.class, imageId);
    return AppImageVoAssembler.create(domImage);
}
项目:openmaxims-linux    文件:NavigationImageSelectDialogImpl.java   
public ims.admin.vo.AppImageVo getImageById(Integer id)
{
    return AppImageVoAssembler.create((AppImage) getDomainFactory().getDomainObject(AppImage.class, id));
}
项目:openmaxims-linux    文件:ImageAdminImpl.java   
public AppImageVoCollection listImages(AppImageVo filter) 
{
    DomainFactory factory = getDomainFactory();     
    StringBuffer cond = new StringBuffer();
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = "";

    if (filter != null)
    {
        if (filter.getImagePath() != null && filter.getImagePath().length() > 0)
        {
            cond.append(andStr + " upper(i.imagePath) like :path");
            names.add("path");
            values.add("%" + filter.getImagePath().toUpperCase() + "%");
            andStr = " and ";
        }
        if (filter.getIsSystem() != null)
        {
            cond.append(andStr + " i.isSystem = :system");
            names.add("system");
            values.add(filter.getIsSystem());
            andStr = " and ";
        }
        if (filter.getIsActive() == null || filter.getIsActive().booleanValue())
        {
            cond.append(andStr + " i.isActive = :isActive ");
            names.add("isActive");
            values.add(Boolean.TRUE);
            andStr = " and ";
        }
    }

    String hql = " from AppImage i ";
    if (!andStr.equals(""))
    {
        hql += " where ";
        hql += cond.toString();
    }
    List images = factory.find(hql,names,values);

    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(images).sort();       
}
项目:openmaxims-linux    文件:ImageAdminImpl.java   
public void deleteImage(AppImageVo image) throws ForeignKeyViolationException 
{
    DomainFactory factory = getDomainFactory();
    AppImage domImage = AppImageVoAssembler.extractAppImage(factory, image);
    factory.delete(domImage);
}
项目:openmaxims-linux    文件:EventConfigurationImpl.java   
public AppImageVoCollection list16x16Icons(String name)
{
    return AppImageVoAssembler.createAppImageVoCollectionFromAppImage(getDomainFactory().find("from AppImage as appImage where (appImage.height = :height and appImage.width = :width and appImage.imagePath like '%" + name + "%')", new String[]{"height", "width"}, new Object[]{16, 16}, 1000));
}