Package org.libreplan.business.common

Examples of org.libreplan.business.common.BaseEntity


    }

    protected abstract void detachFromAllocation();

    public final boolean belongsToSomeOf(Map<Long, Set<BaseEntity>> allocations) {
        BaseEntity parent = getParent();
        if (parent.getId() == null) {
            Set<BaseEntity> entitiesWithNullId = allocations.get(null);
            return entitiesWithNullId != null
                    && entitiesWithNullId.contains(parent);
        }
        Set<BaseEntity> set = allocations.get(parent.getId());
        return set != null;
    }
View Full Code Here


            }
            if (a.size() != b.size()) {
                return false;
            }
            for (int i = 0; i < a.size(); i++) {
                BaseEntity aElement = a.get(i);
                BaseEntity bElement = b.get(i);
                if (!ObjectUtils.equals(aElement.getId(), bElement.getId())) {
                    return false;
                }
            }
            return true;
        }
View Full Code Here

        if (bean == null) {
            // this shouldn't happen, just in case
            return "null";
        }
        if (bean instanceof BaseEntity) {
            BaseEntity entity = (BaseEntity) bean;
            return bean.getClass().getSimpleName() + " "
                    + entity.getExtraInformation();
        }
        return bean.toString();
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.common.BaseEntity

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.