Examples of EMoveToTrash


Examples of framework.generic.EMoveToTrash

    @Override
    protected void onRemove(ServiceGroup entity) throws ClipsServerException {
        Field f1[] = { new Field("serviceGroup", entity) };
       
        if(getEntityCount(Service.class, f1) > 0) {
            throw new EMoveToTrash("Группа содержит услуги, удаление невозможно");
        }
       
        Field f2[] = { new Field("parentServiceGroup", entity) };
        if(getEntityCount(ServiceGroup.class, f2) > 0) {
            throw new EMoveToTrash("Группа содержит группы услуг, удаление невозможно");
        }
    }
View Full Code Here

Examples of framework.generic.EMoveToTrash

        if(getEntityCount(DangerService.class, f) >0){
            throw new EDataIntegrity("Данная услуга обязательна к оказанию по вредному фактору, удаление невозможно");
        }       

        if(getEntityCount(PacketTemplateItem.class, f) > 0) {
            throw new EMoveToTrash("Услуга входит в пакеты услуг, удаление невозможно");
        }
        if(getEntityCount(ServiceRender.class, f) > 0) {
            throw new EMoveToTrash("Данная услуга оказана, удаление невозможно");
        }
        if(getEntityCount(Direction.class, f) > 0) {
            throw new EMoveToTrash("Существуют направления на данную услугу, удаление невозможно");
        }
       
        Field f1[] = {
            new Field("key.pservice", entity.getId()),
        };
View Full Code Here

Examples of framework.generic.EMoveToTrash

    protected void onRemove(Mkb10 entity) throws ClipsServerException {
        Field f1[] = { new Field("mkbRef", entity) };
       // Field parent[] = { new Field("mkbRef", entity) };
       
        if(getEntityCount(Mkb10.class, f1) > 0) {
            throw new EMoveToTrash("Существуют подчиненные диагнозы, удаление невозможно");
        }
   
    Field f2[] = { new Field("mkb10", entity) };
        if(getEntityCount(Followup.class, f2) > 0) {
            throw new EMoveToTrash("Существует диспансеризация с данным диагнозом, удаление невозможно");
        }
        if(getEntityCount(CommitteeResolution.class, f2) > 0) {
            throw new EMoveToTrash("Существует решение КЭК с данным диагнозом, удаление невозможно");
        }
        if(getEntityCount(Diagnosis.class, f2) > 0) {
            throw new EMoveToTrash("Данная болезнь была использована в ЭМК при постановке диагноза, удаление невозможно");
        }
        if(getEntityCount(Direction.class, f2) > 0) {
            throw new EMoveToTrash("Существует направление с данным диагнозом, удаление невозможно");
        }
    }
View Full Code Here

Examples of framework.generic.EMoveToTrash

    protected void onRemove(PacketTemplate entity) throws ClipsServerException {

        Field f1[] = { new Field("packetTemplate", entity) };

        if(getEntityCount(PacketService.class, f1) > 0) {
            throw new EMoveToTrash("По данному пакету уже оказаны услуги, удаление невозможно");
        }
       
        Field f2[] = { new Field("packetServiceTemplate", entity) };
       
        if(getEntityCount(ContractPacket.class, f2, "") > 0) {
            throw new EMoveToTrash("Существуют договора, к которым привязан данный пакет, удаление невозможно");
        }

        deleteEntityList(PacketTemplateItem.class, f2);
    }
View Full Code Here

Examples of framework.generic.EMoveToTrash

     * @throws generic.ClipsServerException
     */
    protected void checkDischarge() throws ClipsServerException{
        TYPE entity = getExistentEntity();
        if (entity.isTrash()){
            throw new EMoveToTrash("Сотрудник был уволен");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.