Package org.libreplan.business.labels.entities

Examples of org.libreplan.business.labels.entities.LabelType


    @Transactional
    private static void updateLabel(LabelReferenceDTO labelDTO,
            Set<Label> labels)
            throws InstanceNotFoundException {
        Label labelToAdd = Registry.getLabelDAO().findByCode(labelDTO.code);
        LabelType labelType = labelToAdd.getType();

        Label labelToChange = getLabelByLabelType(labels, labelType);
        if (labelToAdd.getCode() != labelToChange.getCode()) {
            labels.remove(labelToChange);
            labels.add(labelToAdd);
View Full Code Here


    private List<FilterPair> fillWithFirstTenFiltersLabels() {
        Map<LabelType, List<Label>> mapLabels = databaseSnapshots
                .snapshotLabelsMap();
        Iterator<LabelType> iteratorLabelType = mapLabels.keySet().iterator();
        while (iteratorLabelType.hasNext() && getListMatching().size() < 10) {
            LabelType type = iteratorLabelType.next();
            for (int i = 0; getListMatching().size() < 10
                    && i < mapLabels.get(type).size(); i++) {
                Label label = mapLabels.get(type).get(i);
                addLabel(type, label);
            }
View Full Code Here

    private List<FilterPair> fillWithFirstTenFiltersLabels() {
        Map<LabelType, List<Label>> mapLabels = getLabelsMap();
        Iterator<LabelType> iteratorLabelType = mapLabels.keySet().iterator();
        while (iteratorLabelType.hasNext() && getListMatching().size() < 10) {
            LabelType type = iteratorLabelType.next();
            for (int i = 0; getListMatching().size() < 10
                    && i < mapLabels.get(type).size(); i++) {
                Label label = mapLabels.get(type).get(i);
                addLabel(type, label);
            }
View Full Code Here

    private List<FilterPair> fillWithFirstTenFiltersLabels() {
        Map<LabelType, List<Label>> mapLabels = getLabelsMap();
        Iterator<LabelType> iteratorLabelType = mapLabels.keySet().iterator();
        while (iteratorLabelType.hasNext() && getListMatching().size() < 10) {
            LabelType type = iteratorLabelType.next();
            for (int i = 0; getListMatching().size() < 10
                    && i < mapLabels.get(type).size(); i++) {
                Label label = mapLabels.get(type).get(i);
                addLabel(type, label);
            }
View Full Code Here

    public DescriptionField createValidDescriptionField() {
        return DescriptionField.create(UUID.randomUUID().toString(), 1);
    }

    public WorkReportLabelTypeAssigment createValidWorkReportLabelTypeAssigment() {
        LabelType labelType = LabelType.create(UUID.randomUUID().toString());
        labelTypeDAO.save(labelType);
        Label label = Label.create(UUID.randomUUID().toString());
        label.setType(labelType);
        labelDAO.save(label);
View Full Code Here

        assertEquals(orderLineCopy.getSumChargedEffort()
                .getTotalChargedEffort(), EffortDuration.hours(18));
    }

    private Label givenStoredLabel() {
        LabelType labelType = LabelType.create(UUID.randomUUID().toString());
        labelTypeDAO.save(labelType);

        Label label = Label.create(UUID.randomUUID().toString());
        label.setType(labelType);
        labelDAO.save(label);
View Full Code Here

    private List<FilterPair> fillWithFirstTenFiltersLabels() {
        Map<LabelType, List<Label>> mapLabels = databaseSnapshots
                .snapshotLabelsMap();
        Iterator<LabelType> iteratorLabelType = mapLabels.keySet().iterator();
        while (iteratorLabelType.hasNext() && getListMatching().size() < 10) {
            LabelType type = iteratorLabelType.next();
            for (int i = 0; getListMatching().size() < 10
                    && i < mapLabels.get(type).size(); i++) {
                Label label = mapLabels.get(type).get(i);
                addLabel(type, label);
            }
View Full Code Here

TOP

Related Classes of org.libreplan.business.labels.entities.LabelType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.