Package framework.beans.FindEntity

Examples of framework.beans.FindEntity.Field


   
    @Override
  @SuppressWarnings("deprecation")
    public void clearDirectory() throws ClipsServerException{
        Field[] f = {
            new Field("title", "", Field.OPERATOR_NOT_NULL)
        };
        deleteEntityList(IntelWriter.class, f);
    }
View Full Code Here


   
    @Override
    public ArrayList<CheckupDetails> getClientAnalyseList(int clientID) throws ClipsServerException{
        checkCommandAccessibility(COMMAND_READ_ANALYSE_LIST);
        ArrayList<CheckupDetails> res = new ArrayList<CheckupDetails>();
        Field field[] = {
            new Field("serviceRender.disease.emc.client.id", clientID),
            new Field("serviceRender.cancelled", false),
            new Field("checkupType.isAnalyse", true)
        };
        List list = findEntityList(Checkup.class, field);
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
View Full Code Here

   
    @Override
    public ArrayList<CheckupDetails> getClientCheckupList(int clientID) throws ClipsServerException{
        checkCommandAccessibility(COMMAND_READ_ANALYSE_LIST);
        ArrayList<CheckupDetails> res = new ArrayList<CheckupDetails>();
        Field field[] = {
            new Field("serviceRender.disease.emc.client.id", clientID),
            new Field("serviceRender.cancelled", false),
            new Field("checkupType.isAnalyse", false)
        };
        List list = findEntityList(Checkup.class, field);
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
View Full Code Here

    public ArrayList<CheckupDetails> getFreeAnalysesList() throws ClipsServerException {
        checkCommandAccessibility(COMMAND_READ_ANALYSE_LIST);
        ArrayList<CheckupDetails> res = new ArrayList<CheckupDetails>();
        //не в расписании
        Field[] field = {
            new Field("serviceRender.renderedDate","", Field.OPERATOR_IS_NULL),
            new Field("serviceRender.functions", "", Field.OPERATOR_IS_NULL),
            new Field("serviceRender.cancelled", false),
            new Field("checkupType.isAnalyse", true),
            new Field("checkupShedule", "", Field.OPERATOR_IS_NULL),
        };
        List list = findEntityList(Checkup.class, field);
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        //расписание просрочено
        Date current = new Date();
        current = DateTimeUtils.getDateOnly(current);
        Field[] field1 = {
            new Field("serviceRender.renderedDate", "", Field.OPERATOR_IS_NULL),
            new Field("serviceRender.functions", "", Field.OPERATOR_IS_NULL),
            new Field("serviceRender.cancelled", false),
            new Field("checkupType.isAnalyse", true),
            new Field("checkupShedule.date", current, Field.OPERATOR_LESS)
        };
        list = findEntityList(Checkup.class, field1);
        i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
View Full Code Here

        Calendar begin = getCalendar(1, month, year);
        Calendar end = (Calendar) begin.clone();
        end.add(Calendar.MONTH, 1);

        Field f[] = {
            new Field("collaborator", findEntity(Collaborator.class, collid)),
            new Field("day", begin.getTime(), Field.OPERATOR_EQUAL_OR_MORE),
            new Field("day", end.getTime(), Field.OPERATOR_LESS)
        };
        Iterator res = findEntityWhat(null, Prorumble.class, f, "ORDER By a.day").iterator();
        ArrayList<ProrumbleDetails> list = new ArrayList<ProrumbleDetails>();
        if(res.hasNext()) {
            while(res.hasNext()) {
View Full Code Here

        Calendar end = (Calendar) begin.clone();
        end.add(Calendar.DAY_OF_MONTH, 1);

        Field[] f = {
            new Field("collaborator", findEntity(Collaborator.class, collid)),
            new Field("day", begin.getTime(), Field.OPERATOR_EQUAL_OR_MORE),
            new Field("day", end.getTime(), Field.OPERATOR_LESS)
        };
        return findEntityWhat(null, Prorumble.class, f, "");
    }
View Full Code Here

   
    @Override
    public List<DirectionDetails> getDirectionListToComm(int comReasonID, int clientID, Date from, Date till) throws ClipsServerException{               
        checkCommandAccessibility(COMMAND_WRITE);
        int pos = 2;
        Field f[];
        if (comReasonID != 0) {pos++;}
        if (clientID != 0) {pos++;}
        if (from != null) {pos++;}
        if (till != null) {pos++;}
        f = new Field[pos];
        Field field;
        pos = 0;
        field = new Field("committeeReason", "", Field.OPERATOR_NOT_NULL);
        f[pos++] = field;
        if (comReasonID != 0) {
            CommitteeReason commReason = findEntity(CommitteeReason.class, comReasonID);
            field = new Field("committeeReason", commReason);
            f[pos++] = field;
        }
        if (clientID != 0) {
            Client client = findEntity(Client.class, clientID);
            field = new Field("serviceRender.disease.emc.client", client);
            f[pos++] = field;
        }
        if (from != null) {           
            field = new Field("date", from, Field.OPERATOR_EQUAL_OR_MORE);
            f[pos++] = field;
        }
        if (till != null) {           
            field = new Field("date", till, Field.OPERATOR_EQUAL_OR_LESS);
            f[pos++] = field;
        }       
       
        field = new Field("ordered", false);
        f[pos] = field;
       
        List list = findEntityList(Direction.class, f, "AND a.id not in (select b.direction.id from CommitteeDirection b )");
        List<DirectionDetails> res = new ArrayList<DirectionDetails>();
        Iterator i = list.iterator();
View Full Code Here

    }


    @Override
    protected void onRemove(Enterprise entity) throws ClipsServerException {
        Field f[] = { new Field("enterprise", entity) };
        Field f2[] = { new Field("organization", entity) };
        //проверяем, есть ли связанные направления
        int count = getEntityCount(Direction.class, f);
        if(count > 0) {
            throw new EDataIntegrity("Существуют направления (" + count
                    + " шт.), где указано удаляемое предприятие. Удаление невозможно");
View Full Code Here

     * @param entity
     * @throws ClipsServerException если элемент используется медико-экономическими стандартами
     */
    @Override
    protected void onRemove(MesClass entity) throws ClipsServerException {
        Field f[] = { new Field("cabinet", entity) };
        if(getEntityCount(MedicEconomicStandart.class, f) > 0) {
            throw new EMoveToTrash("В базе есть мэдико-экономически стандаты, удаление невозможно");
        }
    }
View Full Code Here

                return;
        }
        try {
            System.out.println("Clean old sessions: " + new Date(curTime));
            Date d = new Date(curTime - ClipsServerConstants.AUTO_LOGOUT_PERIOD_MS);
            Field f[] = {new Field("lastCallMoment", d, Field.OPERATOR_EQUAL_OR_LESS)};
            deleteEntityList(CollaboratorSessionActive.class, f);
            manager.flush();
        } catch (ClipsServerException ex) {
            throw ex;
        } catch (Throwable ex) {
View Full Code Here

TOP

Related Classes of framework.beans.FindEntity.Field

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.