Package framework.generic

Examples of framework.generic.EDataIntegrity


    }

    @Override
    public ArrayList<ServiceToServiceDetails> getChildServiceList(int pserviceId) throws ClipsServerException {
        if(pserviceId == 0) {
            throw new EDataIntegrity("Попытка получить связанные услуги у услуги с ID=0");
        }
       
        Iterator list = findEntityList(ServiceToService.class, "pservice.id", pserviceId).iterator();
        ArrayList<ServiceToServiceDetails> res = new ArrayList<ServiceToServiceDetails>();
        while(list.hasNext()) {
View Full Code Here


    @Override
    public void removeChildService(ServiceToServiceDetails details, int pserviceId) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_WRITE);
       
        if(pserviceId == 0) {
            throw new EDataIntegrity("Попытка удалить связанную услугу у услуги с ID=0");
        }
       
        Field f[] = {
            new Field("key.pservice", pserviceId),
            new Field("key.cservice", details.cserviceId)
View Full Code Here

    @Override
    public int addChildService(ServiceToServiceDetails details, int pserviceId) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_WRITE);
       
        if(pserviceId == 0) {
            throw new EDataIntegrity("Попытка назначить связанную услугу услуге с ID=0");
        }
       
        ServiceToService serviceToService = null;
        if(details.pserviceId != 0) {
            Field f[] = {
View Full Code Here

    }

    @Override
    public Set<Integer> getActions(int service) throws ClipsServerException {
        if(service == 0) {
            throw new EDataIntegrity("Попытка выбрать действия врача для типа услуги с ID=0");
        }
       
        Iterator<ServiceAction> list = findEntityList(ServiceAction.class, "key.service", service).iterator();
        Set<Integer> res = new HashSet<Integer>();
        while(list.hasNext()) {
View Full Code Here

   
  protected void checkForNotLatin(String str) throws EDataIntegrity{
    for (int i = 0; i < str.length(); i++){
      char      ch = str.charAt(i);
      if (ch >= 0x80) {
        throw new EDataIntegrity("Код MKB10 содержит не латинские буквы!");
      }
    }
  }
View Full Code Here

    }
   
    @Override
    public Set<Integer> getVidals(int mkb10) throws ClipsServerException {
        if(mkb10 == 0) {
            throw new EDataIntegrity("");
        }
       
        Iterator<VidalMkb10> list = findEntityList(VidalMkb10.class, "key.mkb10", mkb10).iterator();
        Set<Integer> res = new HashSet<Integer>();
        while(list.hasNext()) {
View Full Code Here

    }

    @Override
    public void setVidals(int mkb10, Set<Integer> vidals) throws ClipsServerException {
        if(mkb10 == 0) {
            throw new EDataIntegrity("");
        }
        checkCommandAccessibility(COMMAND_WRITE);
        Set<Integer> backup = new HashSet<Integer>(vidals);
        Set<Integer> oldVidals = getVidals(mkb10);
       
View Full Code Here

        } else if (entity instanceof MedicalAidType) {onRemoveDocumentGivenPlace(entity);
        } else if (entity instanceof Speciality) {onRemoveSpeciality(entity);
        } else if (entity instanceof CityDistrictOkato) {onRemoveCityDistrict(entity);
        } else if (entity instanceof Excemption) {onRemoveExemptionType(entity);
        } else {
            throw new EDataIntegrity("Для данного справочника не заданы правила удаления в файле DirectorySimpleBean");
        }

    }
View Full Code Here

    private void onRemoveSurname(DirectoryEntity entity) throws ClipsServerException {
        //Client
        Class <? extends GenericEntity> checked = Client.class;
        Field f[] = { new Field("surname", entity) };
        int count = getEntityCount(checked, f);
        if (count > 0) throw new EDataIntegrity("На элемент '" + entity.getTitle()
                + "' ссылаются " + count + " элементов из таблицы " + getEntityHumanName(checked));
    }
View Full Code Here

        //Client
        Class <? extends GenericEntity> checked = Client.class;
        Field f[] = { new Field("name", entity) };
        int count = getEntityCount(checked, f);
        if (count > 0) {
      throw new EDataIntegrity("На элемент '" + entity.getTitle()
          + "' ссылаются " + count + " элементов из таблицы " + getEntityHumanName(checked));
    }
    }
View Full Code Here

TOP

Related Classes of framework.generic.EDataIntegrity

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.