Java 类ims.core.vo.lookups.ProcedureCategoryCollection 实例源码

项目:openMAXIMS    文件:Logic.java   
private int remainingCategory(DynamicGridRow rowCons)
{
    if (rowCons == null || rowCons.getRows() == null)
        return 0;

    ProcedureCategoryCollection allProcCat = LookupHelper.getProcedureCategory(domain.getLookupService());

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

    for (int i=0 ; i<rowCons.getRows().size(); i++)
    {
        DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN);
        DynamicGridCell dynamicGridCell = rowCons.getRows().get(i).getCells().get(mainCol);

        if (dynamicGridCell.getValue() instanceof ProcedureCategory)
        {
            allProcCat.remove((ProcedureCategory) dynamicGridCell.getValue());
        }
    }

    return allProcCat.size();
}