Package javax.jcr.query.qom

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


                for (PropertyDefinition pd : nt.getPropertyDefinitions()) {
                    PropertyDefinitionImpl propDef = (PropertyDefinitionImpl) pd;
                    if (!propDef.unwrap().definesResidual() && !propDef.isMultiple()) {
                        String sn = selector.getSelectorName();
                        String pn = propDef.getName();
                        columns.add((ColumnImpl) qomFactory.column(sn, pn, sn + "." + pn));
                    }
                }
            } else {
                columns.add(column);
            }
View Full Code Here


            session.getWorkspace().getQueryManager().getQOMFactory();
        // get columns
        Map<Name, ColumnImpl> columns = new LinkedHashMap<Name, ColumnImpl>();
        for (Name name : root.getSelectProperties()) {
            String pn = sessionContext.getJCRName(name);
            ColumnImpl col = (ColumnImpl) qomFactory.column(
                    sessionContext.getJCRName(DEFAULT_SELECTOR_NAME), pn, pn);
            columns.put(name, col);
        }
        if (columns.size() == 0) {
            // use node type constraint
View Full Code Here

    protected ColumnImpl columnForName(Name propertyName) throws RepositoryException {
        Workspace workspace = sessionContext.getSessionImpl().getWorkspace();
        QueryObjectModelFactory qomFactory =
            workspace.getQueryManager().getQOMFactory();
        String name = sessionContext.getJCRName(propertyName);
        return (ColumnImpl) qomFactory.column(
                sessionContext.getJCRName(DEFAULT_SELECTOR_NAME), name, name);
    }
}
View Full Code Here

                                        columnName = "rep:facet(locale=" + languageCode
                                                + (facetOptions.trim().length() > 1 ? "&" : "")
                                                + facetOptions;
                                        QueryObjectModelFactory qomFactory = getModificationInfo()
                                                .getQueryObjectModelFactory();
                                        node = (AbstractQOMNode) qomFactory.column(
                                                selector.getSelectorName(), propertyName,
                                                columnName);
                                    }
                                }
                            }
View Full Code Here

                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));               
            }
        }

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

                for (PropertyDefinition pd : nt.getPropertyDefinitions()) {
                    PropertyDefinitionImpl propDef = (PropertyDefinitionImpl) pd;
                    if (!propDef.definesResidual() && !propDef.isMultiple()) {
                        String sn = selector.getSelectorName();
                        String pn = propDef.getName();
                        columns.add((ColumnImpl) qomFactory.column(sn, pn, sn + "." + pn));
                    }
                }
            } else {
                columns.add(column);
            }
View Full Code Here

                for (PropertyDefinition pd : nt.getPropertyDefinitions()) {
                    PropertyDefinitionImpl propDef = (PropertyDefinitionImpl) pd;
                    if (!propDef.unwrap().definesResidual() && !propDef.isMultiple()) {
                        String sn = selector.getSelectorName();
                        String pn = propDef.getName();
                        columns.add((ColumnImpl) qomFactory.column(sn, pn, sn + "." + pn));
                    }
                }
            } else {
                columns.add(column);
            }
View Full Code Here

            session.getWorkspace().getQueryManager().getQOMFactory();
        // get columns
        Map<Name, ColumnImpl> columns = new LinkedHashMap<Name, ColumnImpl>();
        for (Name name : root.getSelectProperties()) {
            String pn = sessionContext.getJCRName(name);
            ColumnImpl col = (ColumnImpl) qomFactory.column(
                    sessionContext.getJCRName(DEFAULT_SELECTOR_NAME), pn, pn);
            columns.put(name, col);
        }
        if (columns.size() == 0) {
            // use node type constraint
View Full Code Here

    protected ColumnImpl columnForName(Name propertyName) throws RepositoryException {
        Workspace workspace = sessionContext.getSessionImpl().getWorkspace();
        QueryObjectModelFactory qomFactory =
            workspace.getQueryManager().getQOMFactory();
        String name = sessionContext.getJCRName(propertyName);
        return (ColumnImpl) qomFactory.column(
                sessionContext.getJCRName(DEFAULT_SELECTOR_NAME), name, name);
    }
}
View Full Code Here

        QueryObjectModelFactory qomFactory = session.getWorkspace().getQueryManager().getQOMFactory();
        // get columns
        Map<Name, ColumnImpl> columns = new LinkedHashMap<Name, ColumnImpl>();
        for (Name name : root.getSelectProperties()) {
            String pn = session.getJCRName(name);
            ColumnImpl col = (ColumnImpl) qomFactory.column(
                    session.getJCRName(DEFAULT_SELECTOR_NAME), pn, pn);
            columns.put(name, col);
        }
        if (columns.size() == 0) {
            // use node type constraint
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.