Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.QueryObjectModelFactory.literal()


                                                    .comparison(
                                                            qomFactory.propertyValue(
                                                                    selector.getSelectorName(),
                                                                    Constants.JCR_LANGUAGE),
                                                            QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO,
                                                            qomFactory.literal(getValueFactory()
                                                                    .createValue(newLanguageCode)));
                                    langConstraint = langConstraint == null ? currentConstraint
                                            : qomFactory.or(langConstraint, currentConstraint);
                                }
                                getModificationInfo().getNewConstraints().add(langConstraint);
View Full Code Here


            String prop = facet[j++];
            String val = facet[j];
            if (prop.startsWith("rep:filter(")) {
                qomBuilder.andConstraint(factory.fullTextSearch("event", "rep:filter("
                        + Text.escapeIllegalJcrChars(StringUtils
                                .substringAfter(prop, "rep:filter(")), factory.literal(session
                        .getValueFactory().createValue(val))));
            } else {
                qomBuilder.getColumns().add(factory.column("event", prop, val));               
            }
        }
View Full Code Here

            String prop = constraints[j++];
            String val = constraints[j];

            qomBuilder.andConstraint(factory.comparison(factory.propertyValue("event", prop),
                    QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO,
                    factory.literal(session.getValueFactory().createValue(val))));
        }


        QueryObjectModel qom = qomBuilder.createQOM();
        QueryResultWrapper res = (QueryResultWrapper) qom.execute();
View Full Code Here

    // selector
    final Selector selector = fac.selector( "nt:base", selectorName ); //$NON-NLS-1$
    // constraint1
    Constraint origParentFolderPathConstraint =
        fac.comparison( fac.propertyValue( selectorName, pentahoJcrConstants.getPHO_ORIGPARENTFOLDERPATH() ),
            QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, fac.literal( session.getValueFactory().createValue(
                origParentFolderPath ) ) );
    // constraint2
    Constraint origNameConstraint = null;
    if ( StringUtils.hasLength( filter ) ) {
      String convertedFilter = filter.replace( '*', '%' );
View Full Code Here

    Constraint origNameConstraint = null;
    if ( StringUtils.hasLength( filter ) ) {
      String convertedFilter = filter.replace( '*', '%' );
      origNameConstraint =
          fac.comparison( fac.propertyValue( selectorName, pentahoJcrConstants.getPHO_ORIGNAME() ),
              QueryObjectModelConstants.JCR_OPERATOR_LIKE, fac.literal( session.getValueFactory().createValue(
                  convertedFilter ) ) );
    }
    // constraint3
    Constraint descendantNodeConstraint = fac.descendantNode( selectorName, trashNode.getPath() );
    // AND together constraints
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.