Examples of SearchCriteria


Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    query.append("CG01_LEGAL_ENTITY = :legalEntity AND  ");
    query.append("CG01_ORG_UNIT = :organizationUnit ");

    List<SearchCriteria> criteria = new ArrayList<SearchCriteria>();

    criteria.add(new SearchCriteria("dataAl", dataRegistrazioneAl));
    criteria.add(new SearchCriteria("dataDal", dataRegistrazioneDal));
    criteria.add(new SearchCriteria("legalEntity", legalEntity));
    criteria.add(new SearchCriteria("organizationUnit", organizationUnit));

    List<?> list;
    try {
      list = this.getHibernateTemplate().executeFind(
          new ContabilitaHibernateBindCallback(query.toString(), criteria));
View Full Code Here

Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    query.append(" AND MUTUI_ERR.ORG_UNIT = MUTUO.CA01_ORG_UNIT ");
    query.append(" AND MUTUO.CA01_LEGAL_ENTITY = :legalEntity ");
    query.append(" AND MUTUO.CA01_ORG_UNIT = :organizationUnit ");

    List<SearchCriteria> criteria = new ArrayList<SearchCriteria>();
    criteria.add(new SearchCriteria("legalEntity", legalEntity));
    criteria.add(new SearchCriteria("organizationUnit", organizationUnit));

    HashMap<String, Type> mappingCampi = new HashMap<String, Type>();
    mappingCampi.put("numeroMutuo", Hibernate.LONG);
    mappingCampi.put("descrizioneMutuo", Hibernate.STRING);
View Full Code Here

Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    query.append(" CERTIFICAZIONI.CA36_LEGAL_ENTITY = MUTUO.CA01_LEGAL_ENTITY AND ");
    query.append(" CERTIFICAZIONI.CA36_ORG_UNIT = MUTUO.CA01_ORG_UNIT ");
    query.append(" ORDER BY MUTUO.CA01_DSC_MUTUO ");

    List<SearchCriteria> criteria = new ArrayList<SearchCriteria>();
    criteria.add(new SearchCriteria("anno", anno));
    criteria.add(new SearchCriteria("legalEntity", legalEntity));
    criteria.add(new SearchCriteria("organizationUnit", organizationUnit));

    HashMap<String, Type> mappingCampi = new HashMap<String, Type>();

    mappingCampi.put("numeroMutuo", Hibernate.LONG);
    mappingCampi.put("descrizioneMutuo", Hibernate.STRING);
View Full Code Here

Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    GregorianCalendar dataInizio = new GregorianCalendar(anno, 0, 1);
    GregorianCalendar dataFine = new GregorianCalendar(anno, 11, 31);

    List<SearchCriteria> criteria = new ArrayList<SearchCriteria>();
    criteria.add(new SearchCriteria("dataInizio", dataInizio.getTime()));
    criteria.add(new SearchCriteria("dataFine", dataFine.getTime()));
    criteria.add(new SearchCriteria("numeroMutuo", numeroMutuo));
    criteria.add(new SearchCriteria("legalEntity", legalEntity));
    criteria.add(new SearchCriteria("organizationUnit", organizationUnit));

    HashMap<String, Type> mappingCampi = new HashMap<String, Type>();

    mappingCampi.put("cognome", Hibernate.STRING);
    mappingCampi.put("nome", Hibernate.STRING);
View Full Code Here

Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    GregorianCalendar dataInizio = new GregorianCalendar(Integer.parseInt(anno), 0, 1);
    GregorianCalendar dataFine = new GregorianCalendar(Integer.parseInt(anno), 11, 31);

    List<SearchCriteria> criteria = new ArrayList<SearchCriteria>();
    criteria.add(new SearchCriteria("dataInizio", dataInizio.getTime()));
    criteria.add(new SearchCriteria("dataFine", dataFine.getTime()));
    criteria.add(new SearchCriteria("numeroMutuo", numeroMutuo));
    criteria.add(new SearchCriteria("legalEntity", legalEntity));
    criteria.add(new SearchCriteria("organizationUnit", organizationUnit));

    try {
      list = this.getHibernateTemplate().executeFind(
          new ContabilitaHibernateBindCallback(query.toString(), criteria));
    } catch (DataAccessException e) {
View Full Code Here

Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    query.append("GROUP BY PRODOTTO, DURATA, CLASSE_IMPORTO ");
    query.append("ORDER BY PRODOTTO, DURATA, CLASSE_IMPORTO");

    List<SearchCriteria> criteria = new ArrayList<SearchCriteria>();

    criteria.add(new SearchCriteria("dataDecorrenzaDa", dataDecorrenzaDa));
    criteria.add(new SearchCriteria("dataDecorrenzaA", dataDecorrenzaA));

    List<UsuraDetOut> usuraDetList = new ArrayList<UsuraDetOut>();
    List resultList;
    try {
      resultList = getHibernateTemplate().executeFind(
View Full Code Here

Examples of it.pdor.commonLayer.hibernate.searchutils.SearchCriteria

    query.append("         numeroMutuoOriginario   ");
    query.append("ORDER BY numeroMutuo ASC     ");

    // creo la lista di searchCriteria da passare alla bind
    List<SearchCriteria> searchCriteria = new ArrayList<SearchCriteria>();
    SearchCriteria scDataSituazione = new SearchCriteria();
    scDataSituazione.setCampo("dataSituazione");
    scDataSituazione.setValore(dataSituazione);
    searchCriteria.add(scDataSituazione);

    SearchCriteria criteriaLegalEntity = new SearchCriteria("legalEntity", SearchOperators.equal);
    criteriaLegalEntity.setValore(legalEntity);
    searchCriteria.add(criteriaLegalEntity);

    SearchCriteria criteriaOrgUnit = new SearchCriteria("orgUnit", SearchOperators.equal);
    criteriaOrgUnit.setValore(organizationUnit);
    searchCriteria.add(criteriaOrgUnit);

    // searchCriteria.add(scDataSituazione);
    int cont = 0;
    for (SearchCriteriaLogicProduct sclp : andCriteriaList) {
      for (SearchCriteria sc : sclp.getSearchCriteriaList()) {
        SearchCriteria criteriaWithIndex = new SearchCriteria();
        criteriaWithIndex.setCampo(sc.getCampo() + cont);
        criteriaWithIndex.setValore(sc.getValore());
        searchCriteria.add(criteriaWithIndex);
      }
      cont++;
    }
View Full Code Here

Examples of oracle.binding.criteria.SearchCriteria

        return true; // true means we handled this call
    }

    @Override
    public boolean invokeOperation(final Map bindingContext, final OperationBinding action, final DataFilter filter) {
        final SearchCriteria searchCriteria = filter.getSearchCriteria();
        if (searchCriteria != null && searchCriteria.getConjunction() != null &&
            searchCriteria.getSearchGroups() != null && !searchCriteria.getSearchGroups().isEmpty()) {
            throw new UnsupportedOperationException("DataFilter getSearchCriteria in invokeOperation not (yet) supported. ");
        }
        if (filter.getSearchAttributeNames() != null) {
            throw new UnsupportedOperationException("DataFilter getSearchAttributeNames in invokeOperation not (yet) supported. ");
        }
View Full Code Here

Examples of org.jahia.services.search.SearchCriteria

     * @param session
     * @return
     * @throws RepositoryException
     */
    public Query createQuery(String searchString, JCRSessionWrapper session) throws RepositoryException {
        SearchCriteria criteria = new SearchCriteria();
        criteria.getTerms().get(0).setTerm(searchString);
        return jcrSearchProvider.buildQuery(criteria, session);
    }
View Full Code Here

Examples of org.jahia.services.search.SearchCriteria

     * @return the {@link Query} instance, created from the provided search criteria
     * @throws RepositoryException
     * @throws InvalidQueryException
     */
    private Query createQuery(final GWTJahiaSearchQuery gwtQuery, int limit, int offset, JCRSessionWrapper session) throws InvalidQueryException, RepositoryException {
        SearchCriteria criteria = new SearchCriteria();
        if (offset > 0) {
            criteria.setOffset(offset);
        }
        if (limit > 0) {
            criteria.setLimit(limit);
        }

        // page path
        if (gwtQuery.getPages() != null && !gwtQuery.getPages().isEmpty()) {
            criteria.getPagePath().setValue(gwtQuery.getPages().get(0).getPath());
            criteria.getPagePath().setIncludeChildren(true);
        }

        // nodeType
        if (gwtQuery.getNodeTypes() != null && gwtQuery.getNodeTypes().size() == 1) {
            criteria.setNodeType(gwtQuery.getNodeTypes().get(0));
            gwtQuery.getNodeTypes().clear();
        }       
       
        // language
        if (gwtQuery.getLanguage() != null && gwtQuery.getLanguage().getLanguage() != null) {
            criteria.getLanguages().setValue(gwtQuery.getLanguage().getLanguage());
        }

//        // category
//        if (gwtQuery.getCategories() != null && !gwtQuery.getCategories().isEmpty()) {
//            criteria.getLanguages().setValue(gwtQuery.getLanguage().getLanguage());
//        }
//
        // query string
        if (gwtQuery.getQuery() != null && gwtQuery.getQuery().length() > 0) {
            criteria.getTerms().get(0).setTerm(gwtQuery.getQuery());
            SearchFields fields = criteria.getTerms().get(0).getFields();
            fields.setSiteContent(gwtQuery.isInContents());
            fields.setFilename(gwtQuery.isInName());
            fields.setFileContent(gwtQuery.isInFiles());
            fields.setTitle(gwtQuery.isInMetadatas());
            fields.setDescription(gwtQuery.isInMetadatas());
            fields.setKeywords(gwtQuery.isInMetadatas());
            fields.setTags(gwtQuery.isInTags());
        }
       
        if (gwtQuery.getOriginSiteUuid() != null) {
            String siteKey = JCRTemplate.getInstance().doExecuteWithSystemSession(new JCRCallback<String>() {
                public String doInJCR(JCRSessionWrapper session) throws RepositoryException {
                    try {
                        JCRNodeWrapper nodeWrapper = session.getNodeByIdentifier(gwtQuery.getOriginSiteUuid());
                        return nodeWrapper.getName();
                    } catch (ItemNotFoundException e) {
                        logger.error("Unable for find site node by UUID: " + gwtQuery.getOriginSiteUuid(), e);
                    }
                    return null;
                }
            });
            if (siteKey != null) {
                criteria.setOriginSiteKey(siteKey);
            }
           
        }

        return jcrSearchProvider.buildQuery(criteria, session);
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.