Java 类ims.core.vo.DataSetTypeVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void doSearch()
{
    String name = form.txtName().getValue();
    if(name == null || name.trim().length() == 0)
    {
        name = "%";
    }
    /*
    if(form.cmbCategory().getValue() == null)
    {
        return;
    }
    */
    DataSetTypeVoCollection coll = domain.listDataSetType("%" + name + "%", form.cmbCategory().getValue(), null);

    displayDataSetType(coll);

    if(coll.size() > 0 && form.getGlobalContext().Core.getDataSetRecordIsNotNull())
        form.grdList().setValue(form.getGlobalContext().Core.getDataSetRecord());
}
项目:AvoinApotti    文件:Logic.java   
private void submitQmbDataset(String value, DataSetTypeVo voToSelect)
{
    form.qmbDataset().clear();

    DataSetTypeVoCollection dataset = domain.listDataset("%" + value + "%");

    for (int i = 0; i < dataset.size(); i++)
    {
        form.qmbDataset().newRow(dataset.get(i), dataset.get(i).getName());
    }

    if(dataset.size() == 1)
    {
        form.qmbDataset().setValue(dataset.get(0));
    }
    else
    {
        if(voToSelect == null)
            form.qmbDataset().showOpened();
        else
            form.qmbDataset().setValue(voToSelect);
    }

    form.dyngrdChart().getRows().clear();
}
项目:openMAXIMS    文件:Logic.java   
private void doSearch()
{
    String name = form.txtName().getValue();
    if(name == null || name.trim().length() == 0)
    {
        name = "%";
    }
    /*
    if(form.cmbCategory().getValue() == null)
    {
        return;
    }
    */
    DataSetTypeVoCollection coll = domain.listDataSetType("%" + name + "%", form.cmbCategory().getValue(), null);

    displayDataSetType(coll);

    if(coll.size() > 0 && form.getGlobalContext().Core.getDataSetRecordIsNotNull())
        form.grdList().setValue(form.getGlobalContext().Core.getDataSetRecord());
}
项目:openMAXIMS    文件:Logic.java   
private void submitQmbDataset(String value, DataSetTypeVo voToSelect)
{
    form.qmbDataset().clear();

    DataSetTypeVoCollection dataset = domain.listDataset("%" + value + "%");

    for (int i = 0; i < dataset.size(); i++)
    {
        form.qmbDataset().newRow(dataset.get(i), dataset.get(i).getName());
    }

    if(dataset.size() == 1)
    {
        form.qmbDataset().setValue(dataset.get(0));
    }
    else
    {
        if(voToSelect == null)
            form.qmbDataset().showOpened();
        else
            form.qmbDataset().setValue(voToSelect);
    }

    form.dyngrdChart().getRows().clear();
}
项目:openMAXIMS    文件:Logic.java   
private void doSearch()
{
    String name = form.txtName().getValue();
    if(name == null || name.trim().length() == 0)
    {
        name = "%";
    }
    /*
    if(form.cmbCategory().getValue() == null)
    {
        return;
    }
    */
    DataSetTypeVoCollection coll = domain.listDataSetType("%" + name + "%", form.cmbCategory().getValue(), null);

    displayDataSetType(coll);

    if(coll.size() > 0 && form.getGlobalContext().Core.getDataSetRecordIsNotNull())
        form.grdList().setValue(form.getGlobalContext().Core.getDataSetRecord());
}
项目:openMAXIMS    文件:Logic.java   
private void submitQmbDataset(String value, DataSetTypeVo voToSelect)
{
    form.qmbDataset().clear();

    DataSetTypeVoCollection dataset = domain.listDataset("%" + value + "%");

    for (int i = 0; i < dataset.size(); i++)
    {
        form.qmbDataset().newRow(dataset.get(i), dataset.get(i).getName());
    }

    if(dataset.size() == 1)
    {
        form.qmbDataset().setValue(dataset.get(0));
    }
    else
    {
        if(voToSelect == null)
            form.qmbDataset().showOpened();
        else
            form.qmbDataset().setValue(voToSelect);
    }

    form.dyngrdChart().getRows().clear();
}
项目:openmaxims-linux    文件:Logic.java   
private void doSearch()
{
    String name = form.txtName().getValue();
    if(name == null || name.trim().length() == 0)
    {
        name = "%";
    }
    /*
    if(form.cmbCategory().getValue() == null)
    {
        return;
    }
    */
    DataSetTypeVoCollection coll = domain.listDataSetType("%" + name + "%", form.cmbCategory().getValue(), null);

    displayDataSetType(coll);

    if(coll.size() > 0 && form.getGlobalContext().Core.getDataSetRecordIsNotNull())
        form.grdList().setValue(form.getGlobalContext().Core.getDataSetRecord());
}
项目:openmaxims-linux    文件:Logic.java   
private void submitQmbDataset(String value, DataSetTypeVo voToSelect)
{
    form.qmbDataset().clear();

    DataSetTypeVoCollection dataset = domain.listDataset("%" + value + "%");

    for (int i = 0; i < dataset.size(); i++)
    {
        form.qmbDataset().newRow(dataset.get(i), dataset.get(i).getName());
    }

    if(dataset.size() == 1)
    {
        form.qmbDataset().setValue(dataset.get(0));
    }
    else
    {
        if(voToSelect == null)
            form.qmbDataset().showOpened();
        else
            form.qmbDataset().setValue(voToSelect);
    }

    form.dyngrdChart().getRows().clear();
}
项目:AvoinApotti    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
protected void onImbFindClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.txtSearchName().getValue() == null || form.txtSearchName().getValue().trim().length() == 0)
    {
        engine.showMessage("Please select a name to search for.");
        return;
    }

    if(form.cmbSearchCategory().getValue() == null)
    {
        engine.showMessage("Please select a category to search for.");
        return;
    }

    form.grdDataSetList().getRows().clear();

    DataSetTypeVoCollection coll = domain.listDataSetType("%" + form.txtSearchName().getValue().trim() + "%", form.cmbSearchCategory().getValue(), Boolean.TRUE);

    //WDEV-16848
    if(coll == null || coll.size() == 0)
    {
        engine.showMessage("No records found.");
        return;
    }

    displayRecords(coll);
}
项目:AvoinApotti    文件:Logic.java   
private void displayRecords(DataSetTypeVoCollection coll)
{
    for (int i = 0; i < coll.size(); i++)
    {
        grdDataSetListRow row = form.grdDataSetList().getRows().newRow();

        row.setColDataSet(coll.get(i).getName());
        row.setValue(coll.get(i));
    }

}
项目:openMAXIMS    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onImbFindClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.txtSearchName().getValue() == null || form.txtSearchName().getValue().trim().length() == 0)
    {
        engine.showMessage("Please select a name to search for.");
        return;
    }

    if(form.cmbSearchCategory().getValue() == null)
    {
        engine.showMessage("Please select a category to search for.");
        return;
    }

    form.grdDataSetList().getRows().clear();

    DataSetTypeVoCollection coll = domain.listDataSetType("%" + form.txtSearchName().getValue().trim() + "%", form.cmbSearchCategory().getValue(), Boolean.TRUE);

    //WDEV-16848
    if(coll == null || coll.size() == 0)
    {
        engine.showMessage("No records found.");
        return;
    }

    displayRecords(coll);
}
项目:openMAXIMS    文件:Logic.java   
private void displayRecords(DataSetTypeVoCollection coll)
{
    for (int i = 0; i < coll.size(); i++)
    {
        grdDataSetListRow row = form.grdDataSetList().getRows().newRow();

        row.setColDataSet(coll.get(i).getName());
        row.setValue(coll.get(i));
    }

}
项目:openMAXIMS    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
protected void onImbFindClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.txtSearchName().getValue() == null || form.txtSearchName().getValue().trim().length() == 0)
    {
        engine.showMessage("Please select a name to search for.");
        return;
    }

    if(form.cmbSearchCategory().getValue() == null)
    {
        engine.showMessage("Please select a category to search for.");
        return;
    }

    form.grdDataSetList().getRows().clear();

    DataSetTypeVoCollection coll = domain.listDataSetType("%" + form.txtSearchName().getValue().trim() + "%", form.cmbSearchCategory().getValue(), Boolean.TRUE);

    //WDEV-16848
    if(coll == null || coll.size() == 0)
    {
        engine.showMessage("No records found.");
        return;
    }

    displayRecords(coll);
}
项目:openMAXIMS    文件:Logic.java   
private void displayRecords(DataSetTypeVoCollection coll)
{
    for (int i = 0; i < coll.size(); i++)
    {
        grdDataSetListRow row = form.grdDataSetList().getRows().newRow();

        row.setColDataSet(coll.get(i).getName());
        row.setValue(coll.get(i));
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
protected void onImbFindClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.txtSearchName().getValue() == null || form.txtSearchName().getValue().trim().length() == 0)
    {
        engine.showMessage("Please select a name to search for.");
        return;
    }

    if(form.cmbSearchCategory().getValue() == null)
    {
        engine.showMessage("Please select a category to search for.");
        return;
    }

    form.grdDataSetList().getRows().clear();

    DataSetTypeVoCollection coll = domain.listDataSetType("%" + form.txtSearchName().getValue().trim() + "%", form.cmbSearchCategory().getValue(), Boolean.TRUE);

    //WDEV-16848
    if(coll == null || coll.size() == 0)
    {
        engine.showMessage("No records found.");
        return;
    }

    displayRecords(coll);
}
项目:openmaxims-linux    文件:Logic.java   
private void displayRecords(DataSetTypeVoCollection coll)
{
    for (int i = 0; i < coll.size(); i++)
    {
        grdDataSetListRow row = form.grdDataSetList().getRows().newRow();

        row.setColDataSet(coll.get(i).getName());
        row.setValue(coll.get(i));
    }

}
项目:AvoinApotti    文件:Logic.java   
private void displayDataSetType(DataSetTypeVoCollection coll)
{
    String str;

    form.grdList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        DataSetTypeVo item = coll.get(i);

        grdListRow row = form.grdList().getRows().newRow();

        row.setColName(item.getName());
        row.setColCategory(item.getCategoryIsNotNull() ? item.getCategory().getText() : null);

        str = "";
        if(item.getMinFactorIsNotNull())
        {
            str += item.getMinFactor();
            str += " - ";
        }
        if(item.getMaxFactorIsNotNull())
        {
            str += item.getMaxFactor();
        }
        row.setColMaxFactor(str);

        str = "";
        if(item.getNormalBandMaxValueMaleIsNotNull() 
                && item.getNormalBandMaxValueFemaleIsNotNull() 
                && item.getNormalBandMinValueMaleIsNotNull() 
                && item.getNormalBandMinValueFemaleIsNotNull()
                && item.getNormalBandMaxValueMale().equals(item.getNormalBandMaxValueFemale())
                && item.getNormalBandMinValueMale().equals(item.getNormalBandMinValueFemale()))
        {
            str += item.getNormalBandMinValueMale();
            str += "-";
            str += item.getNormalBandMaxValueMale();
        }
        else
        {
            if(item.getNormalBandMinValueMaleIsNotNull())
            {
                str += item.getNormalBandMinValueMale();
            }
            str += "-";
            if(item.getNormalBandMaxValueMaleIsNotNull())
            {
                str += item.getNormalBandMaxValueMale();
            }
            str += " (Male) / ";

            if(item.getNormalBandMinValueFemaleIsNotNull())
            {
                str += item.getNormalBandMinValueFemale();
            }
            str += "-";
            if(item.getNormalBandMaxValueFemaleIsNotNull())
            {
                str += item.getNormalBandMaxValueFemale();
            }
            str += " (Female)";
        }
        row.setColBand(str);

        row.setColLineType(item.getDefaultLineTypeIsNotNull() ? item.getDefaultLineType().getText() : null);
        row.setColColourIcon(item.getDefLineColPtIcon());

        row.setValue(item);

        if(item.getIsActive() == null || item.getIsActive().booleanValue() == false)
            row.setTextColor(Color.DarkGray);
    }


}
项目:openMAXIMS    文件:Logic.java   
private void displayDataSetType(DataSetTypeVoCollection coll)
{
    String str;

    form.grdList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        DataSetTypeVo item = coll.get(i);

        grdListRow row = form.grdList().getRows().newRow();

        row.setColName(item.getName());
        row.setColCategory(item.getCategoryIsNotNull() ? item.getCategory().getText() : null);

        str = "";
        if(item.getMinFactorIsNotNull())
        {
            str += item.getMinFactor();
            str += " - ";
        }
        if(item.getMaxFactorIsNotNull())
        {
            str += item.getMaxFactor();
        }
        row.setColMaxFactor(str);

        str = "";
        if(item.getNormalBandMaxValueMaleIsNotNull() 
                && item.getNormalBandMaxValueFemaleIsNotNull() 
                && item.getNormalBandMinValueMaleIsNotNull() 
                && item.getNormalBandMinValueFemaleIsNotNull()
                && item.getNormalBandMaxValueMale().equals(item.getNormalBandMaxValueFemale())
                && item.getNormalBandMinValueMale().equals(item.getNormalBandMinValueFemale()))
        {
            str += item.getNormalBandMinValueMale();
            str += "-";
            str += item.getNormalBandMaxValueMale();
        }
        else
        {
            if(item.getNormalBandMinValueMaleIsNotNull())
            {
                str += item.getNormalBandMinValueMale();
            }
            str += "-";
            if(item.getNormalBandMaxValueMaleIsNotNull())
            {
                str += item.getNormalBandMaxValueMale();
            }
            str += " (Male) / ";

            if(item.getNormalBandMinValueFemaleIsNotNull())
            {
                str += item.getNormalBandMinValueFemale();
            }
            str += "-";
            if(item.getNormalBandMaxValueFemaleIsNotNull())
            {
                str += item.getNormalBandMaxValueFemale();
            }
            str += " (Female)";
        }
        row.setColBand(str);

        row.setColLineType(item.getDefaultLineTypeIsNotNull() ? item.getDefaultLineType().getText() : null);
        row.setColColourIcon(item.getDefLineColPtIcon());

        row.setValue(item);

        if(item.getIsActive() == null || item.getIsActive().booleanValue() == false)
            row.setTextColor(Color.DarkGray);
    }


}
项目:openMAXIMS    文件:Logic.java   
private void displayDataSetType(DataSetTypeVoCollection coll)
{
    String str;

    form.grdList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        DataSetTypeVo item = coll.get(i);

        grdListRow row = form.grdList().getRows().newRow();

        row.setColName(item.getName());
        row.setColCategory(item.getCategoryIsNotNull() ? item.getCategory().getText() : null);

        str = "";
        if(item.getMinFactorIsNotNull())
        {
            str += item.getMinFactor();
            str += " - ";
        }
        if(item.getMaxFactorIsNotNull())
        {
            str += item.getMaxFactor();
        }
        row.setColMaxFactor(str);

        str = "";
        if(item.getNormalBandMaxValueMaleIsNotNull() 
                && item.getNormalBandMaxValueFemaleIsNotNull() 
                && item.getNormalBandMinValueMaleIsNotNull() 
                && item.getNormalBandMinValueFemaleIsNotNull()
                && item.getNormalBandMaxValueMale().equals(item.getNormalBandMaxValueFemale())
                && item.getNormalBandMinValueMale().equals(item.getNormalBandMinValueFemale()))
        {
            str += item.getNormalBandMinValueMale();
            str += "-";
            str += item.getNormalBandMaxValueMale();
        }
        else
        {
            if(item.getNormalBandMinValueMaleIsNotNull())
            {
                str += item.getNormalBandMinValueMale();
            }
            str += "-";
            if(item.getNormalBandMaxValueMaleIsNotNull())
            {
                str += item.getNormalBandMaxValueMale();
            }
            str += " (Male) / ";

            if(item.getNormalBandMinValueFemaleIsNotNull())
            {
                str += item.getNormalBandMinValueFemale();
            }
            str += "-";
            if(item.getNormalBandMaxValueFemaleIsNotNull())
            {
                str += item.getNormalBandMaxValueFemale();
            }
            str += " (Female)";
        }
        row.setColBand(str);

        row.setColLineType(item.getDefaultLineTypeIsNotNull() ? item.getDefaultLineType().getText() : null);
        row.setColColourIcon(item.getDefLineColPtIcon());

        row.setValue(item);

        if(item.getIsActive() == null || item.getIsActive().booleanValue() == false)
            row.setTextColor(Color.DarkGray);
    }


}
项目:openmaxims-linux    文件:Logic.java   
private void displayDataSetType(DataSetTypeVoCollection coll)
{
    String str;

    form.grdList().getRows().clear();

    for (int i = 0; i < coll.size(); i++)
    {
        DataSetTypeVo item = coll.get(i);

        grdListRow row = form.grdList().getRows().newRow();

        row.setColName(item.getName());
        row.setColCategory(item.getCategoryIsNotNull() ? item.getCategory().getText() : null);

        str = "";
        if(item.getMinFactorIsNotNull())
        {
            str += item.getMinFactor();
            str += " - ";
        }
        if(item.getMaxFactorIsNotNull())
        {
            str += item.getMaxFactor();
        }
        row.setColMaxFactor(str);

        str = "";
        if(item.getNormalBandMaxValueMaleIsNotNull() 
                && item.getNormalBandMaxValueFemaleIsNotNull() 
                && item.getNormalBandMinValueMaleIsNotNull() 
                && item.getNormalBandMinValueFemaleIsNotNull()
                && item.getNormalBandMaxValueMale().equals(item.getNormalBandMaxValueFemale())
                && item.getNormalBandMinValueMale().equals(item.getNormalBandMinValueFemale()))
        {
            str += item.getNormalBandMinValueMale();
            str += "-";
            str += item.getNormalBandMaxValueMale();
        }
        else
        {
            if(item.getNormalBandMinValueMaleIsNotNull())
            {
                str += item.getNormalBandMinValueMale();
            }
            str += "-";
            if(item.getNormalBandMaxValueMaleIsNotNull())
            {
                str += item.getNormalBandMaxValueMale();
            }
            str += " (Male) / ";

            if(item.getNormalBandMinValueFemaleIsNotNull())
            {
                str += item.getNormalBandMinValueFemale();
            }
            str += "-";
            if(item.getNormalBandMaxValueFemaleIsNotNull())
            {
                str += item.getNormalBandMaxValueFemale();
            }
            str += " (Female)";
        }
        row.setColBand(str);

        row.setColLineType(item.getDefaultLineTypeIsNotNull() ? item.getDefaultLineType().getText() : null);
        row.setColColourIcon(item.getDefLineColPtIcon());

        row.setValue(item);

        if(item.getIsActive() == null || item.getIsActive().booleanValue() == false)
            row.setTextColor(Color.DarkGray);
    }


}