Package org.hibernate.criterion

Examples of org.hibernate.criterion.SimpleExpression


      Conjunction andsDatifin = null;
      Conjunction andsMutuo = Restrictions.conjunction();

      for (SearchCriteria sc : sclp.getSearchCriteriaList()) {

        SimpleExpression simpleExpression = sc.getSimpleExpression();
        if (sc.getValore() instanceof String)
          simpleExpression.ignoreCase();
        if (((SearchCriteriaWithEntity) sc).getEntity() == GruppoDatiFinanziari.class) {
          // Aggiungo condizioni di and alla subquery dei mutui
          if (datifinCriteria == null) {
            datifinCriteria = DetachedCriteria.forClass(GruppoDatiFinanziari.class);
            datifinCriteria.setProjection(Projections.property("mutuo"));
View Full Code Here


      Conjunction andsTestata = Restrictions.conjunction();

      for (SearchCriteria sc : sclp.getSearchCriteriaList()) {
        Conjunction andsAgente = null;
       
        SimpleExpression simpleExpression = sc.getSimpleExpression();
        if (sc.getValore() instanceof String)
          simpleExpression.ignoreCase();
        if (((SearchCriteriaWithEntity) sc).getEntity() == AgenteTabellaFinanziaria.class) {
          // Aggiungo condizioni di and alla subquery della testata
          if (agenteCriteria == null) {
            agenteCriteria = DetachedCriteria.forClass(AgenteTabellaFinanziaria.class);
            agenteCriteria.setProjection(Projections.property("testataTabellaFinanziaria.numeroTabellaFinanziaria"));
View Full Code Here

        }
    }
   
    private List<?> getResultSet(Class<? extends Entity> entity, String field,
            String param, boolean ignoreCase) {
        SimpleExpression fieldRestriction = Restrictions.eq(field, param);
        if (ignoreCase) {
            fieldRestriction = fieldRestriction.ignoreCase();
        }
        return sessionFactory
            .getCurrentSession()
            .createCriteria(entity)
            .add(fieldRestriction)
View Full Code Here

  @Override
    public List<Analysis> getAnalysisByDateMedicaPatiente(Date date, Patient patient, Medic medic) throws ExceptionDAO {
        try {
            this.logger.logDebug("Getting analysis by patint, medic and date");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            SimpleExpression dateR = (date == null) ? null : Restrictions.eq("analysisDay", date);
            SimpleExpression patientR = (patient == null) ? null : Restrictions.eq("patient", patient);
            SimpleExpression medicR = (medic == null) ? null : Restrictions.eq("medic", medic);

            Criteria criteria = currentSession.createCriteria(Analysis.class);
            if (dateR != null) {
                criteria = criteria.add(dateR);
            }
View Full Code Here

TOP

Related Classes of org.hibernate.criterion.SimpleExpression

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.