Package beans.user.client.entity

Examples of beans.user.client.entity.Client


            ArrayList<FollowupData> target = new ArrayList<FollowupData>();
            for (int i = 0; i < res.size(); i++) {
                Object[] line = res.get(i);
                Followup f = (Followup) line[0];
                FollowupEvent e = (FollowupEvent) line[1];
                Client c = (Client) line [2];
                FollowupData d = new FollowupData();
                d.details = f.getDetails(this);
                d.fio = c.getFio();
                d.clientID = c.getId();
                d.lastEventDetails = e.getDetails(this);
                target.add(d);
            }
            return target;
    }
View Full Code Here


        entity.setAddressCashe("");
    }

   
    private Client checkNotSelf(int mother) throws ClipsServerException {
        Client m = findEntity(Client.class, mother);
    if (getId() != 0){
      Client entity = getExistentEntity();
      if (m.getId() == entity.getId()) {
        throw new EDataIntegrity("Нельзя указать в качестве родителей " +
                        "или представителя пациента его самого");
      }
    }
        return m;
View Full Code Here

   * @throws ClipsServerException
     */
    @Override
    public AddressDetails getAddress() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ);
        Client entity = getExistentEntity();
        Address addr = entity.getAddress();
        if (addr == null) {
            addr = new Address();
        }
        return addr.getDetails((RightChecker) this);
    }
View Full Code Here

     *          безопастности либо произошла ошибка
     */
    @Override
    public ModificationInfo setAddress(AddressDetails details) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_MODIFY);
        Client entity = getExistentEntity();
        AuditDoc<Client> auditDoc = new AuditDoc<Client>(entity, getCollaborator());
        Address addr = entity.getAddress();
        boolean newAddr = false;
        if (addr == null) {
            addr = new Address();
            newAddr = true;
        }

        addr.setBuilding(details.building);
        addr.setFlat(details.flat);
        addr.setAddressObject(findEntity(AddressObject.class, details.objectId));
//        addr.setId(details.id);

        saveEntity(addr);
        if(newAddr) {
            entity.setAddress(addr);
            saveEntity(entity);
        }
        if (auditDoc.check(entity)) {
            return new ModificationInfo(persistAudit(auditDoc));
        } else {
View Full Code Here

     */
    @Override
    public EmcDetails getEmc()  throws ClipsServerException {
        //Не надо запрещать доступ - просто затереть поле анамнеза
        //checkCommandAccessibility(COMMAND_READ_EMC);
        Client entity = getExistentEntity();
       
        EmcDetails details = getEmcByClient(manager, entity).getDetails(this);
        return details;
    }
View Full Code Here

     * @return список работ
     */
    @Override
    public List<JobDetails> getJobList() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ);
        Client entity = getExistentEntity();
       
        List jobs = findEntityList(Job.class, "client", entity, "ORDER BY a.begin");
        List<JobDetails> res = new ArrayList<JobDetails>();
        Iterator i = jobs.iterator();
        while (i.hasNext()) {
View Full Code Here

   * @throws ClipsServerException
     */
    @Override
    public JobDetails getLastJob() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ);
        Client entity = getExistentEntity();
        List jobs = findEntityList(Job.class, "client", entity, " AND a.end IS NULL ORDER BY a.begin DESC");
        if (jobs.isEmpty()) {
            return null;
        }
        Job job = (Job) jobs.get(0);
View Full Code Here

     * @return список договоров
     */
    @Override
    public List<PolisDetails> getPolisList() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ_CONTRACT);
        Client entity = getExistentEntity();
       
        List<Polis> ps = findEntityList(Polis.class, "client", entity);
        List<PolisDetails> res = new ArrayList<PolisDetails>();
        Iterator<Polis> i = ps.iterator();
        while (i.hasNext()) {
View Full Code Here

     * @return список услуг
     */
    @Override
    public List<ServiceRenderDetails> getServiceRendersToRender() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ);
        Client entity = getExistentEntity();
       
        Field fields[] = {
            new Field("polis.client", entity),
            new Field("renderedDate", "", Field.OPERATOR_IS_NULL),
            new Field("cancelled", false)
View Full Code Here

     * @return список договоров
     */
    @Override
    public List<ServiceRenderDetails> getServiceRendersNotInDisease() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ);
        Client entity = getExistentEntity();
       
        Field fields[] = {
            new Field("polis.client", entity),
            new Field("disease", "", Field.OPERATOR_IS_NULL),
            new Field("cancelled", false)
View Full Code Here

TOP

Related Classes of beans.user.client.entity.Client

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.