Examples of ViewObject


Examples of oracle.jbo.ViewObject

        if (autoCrit.getOperator().getOperandCount() != 1) {
            throw new IllegalArgumentException("autoComplete needs an attribuut with as default operator a single-value.");
        }
        critVals.set(0, value);
        performQuery(queryDescriptor);
        final ViewObject vo = tableModel.getViewOject();
        logger.fine("autoComplete found {0} row(s).", vo.getRowCount());
        if (vo.getRowCount() == 1) { // If we find 1 row, return this.
            final Object row = vo.getRowAtRangeIndex(0);
            if (row instanceof Row && !(row instanceof Map)) { // Wrap as Map, because this is expected by valueSelected
                final Object rowMap = new RowMapAdapter((Row) row);
                return Collections.singletonList(rowMap);
            }
            return Collections.singletonList(row);
View Full Code Here

Examples of oracle.jbo.ViewObject

        // Cache for better performance by repeating the same lookup.
        if (searchVals.equals(this.lastLookupVals)) {
            return lastLookupRow;
        }
        // Iterate through the ViewObject rows to find the lookup-row.
        final ViewObject vo = getTableModel().getViewOject();
        final ViewCriteria oldCriteria = vo.getViewCriteria();
        vo.applyViewCriteria(vo.createViewCriteria());
        Map<String, Object> retval = null;
        try {
            final RowSetIterator iter = vo.createRowSetIterator("__lookup__");
            iter.setRowValidation(false);
            try {
                while (iter.hasNext()) {
                    final Row row = iter.next();
                    boolean isLookup = true;
                    // Compare the values of all the lookup attributes.
                    for (String tableAttrName : lookups.keySet()) {
                        final Object rowVal = row.getAttribute(tableAttrName);
                        final Object bindingVal = searchVals.get(tableAttrName);
                        if (!new EqualsBuilder().append(rowVal,
                                                        bindingVal).isEquals()) { // Difference found, we stop the compare.
                            isLookup = false;
                            break;
                        }
                    }
                    if (isLookup) {
                        retval = new RowMapAdapter(row) {
                            @Override
                            public Object put(final String key, final Object value) { // Ignore the put operation, because the lookup row is always
                                // read only and we don't want to put.
                                return null;
                            }
                        };
                    }
                }
            } finally {
                iter.closeRowSetIterator();
            }
        } finally {
            vo.applyViewCriteria(oldCriteria);
        }
        if (retval == null) { // Row not found.
            retval = Collections.emptyMap();
        }
        lastLookupVals = searchVals;
View Full Code Here

Examples of oracle.jbo.ViewObject

    public Map<String, Object> getLookup() {
        return getLovModel().getLookup();
    }

    protected ModelImpl createModel() {
        final ViewObject vo = getViewObject();
        logger.fine("creating ListOfValuesModel for {0}", vo);
        // TableModel for result-table
        final TableModelImpl resultTab = createTableModel(vo);
        // Build search criteria
        final ConjunctionCriterionImpl crits = createConjunction(resultTab);
View Full Code Here

Examples of org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject

    private void recurseDOMModel(final Node node, final ComponentInfo parent,
            final IDocument document,
            XMLViewObjectConstructionStrategy objectConstructionStrategy)
    {
        ViewObject mappedObject = null;

        objectConstructionStrategy.getConstructionData().setParent(parent);

        mappedObject = _adapter.mapToViewObject(node,
                objectConstructionStrategy, document);
View Full Code Here

Examples of org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject

        if (elementData == null)
        {
            throw new IllegalArgumentException("elementData mustn't be null"); //$NON-NLS-1$
        }

        ViewObject viewObject = null;
        synchronized(this)
        {
            viewObject = _elementToViewObjMap.remove(elementData);
            if (viewObject != null)
            {
View Full Code Here

Examples of org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject

        {
            final ElementData elementData = XMLViewObjectMappingService
                    .createElementData(elementAdapter.getNamespace(),
                            elementAdapter.getLocalName(), context,
                            Collections.EMPTY_MAP);
            final ViewObject viewObject = mappingService
                    .findViewObject(elementData);
            // if the corresponding view object is a valueholder, then
            // we need to see if you think there a valid conversion
            // available
            if (viewObject instanceof ComponentInfo
View Full Code Here

Examples of org.fcrepo.client.actions.ViewObject

                                    .ingestAndCommit(Administrator.APIA,
                                                     Administrator.APIM,
                                                     in,
                                                     FOXML1_1.uri,
                                                     "Created with Admin GUI \"New Object\" command");
                    new ViewObject(newPID).launch();
                }
            } catch (Exception e) {
                String msg = e.getMessage();
                if (msg == null) {
                    msg = e.getClass().getName();
View Full Code Here

Examples of org.fcrepo.client.actions.ViewObject

                    if (e.getClickCount() == 2) {
                        int rowNum =
                                m_table.rowAtPoint(new Point(e.getX(), e.getY()));
                        if (rowNum >= 0) {
                            // launch object viewer to view object
                            new ViewObject(m_rowPids[rowNum]).launch();
                        }
                    }
                }

                @Override
View Full Code Here

Examples of org.fcrepo.client.actions.ViewObject

        private static final long serialVersionUID = 1L;

        public SingleSelectionPopup(String pid) {
            super();
            JMenuItem i0 = new JMenuItem(new ViewObject(pid));
            i0.setMnemonic(KeyEvent.VK_O);
            i0.setToolTipText("Launches a viewer for the selected object.");
            JMenuItem i1 = new JMenuItem(new ViewObjectXML(pid));
            i1.setMnemonic(KeyEvent.VK_V);
            i1.setToolTipText("Launches an XML viewer for the selected object.");
View Full Code Here

Examples of org.fcrepo.client.actions.ViewObject

        private static final long serialVersionUID = 1L;

        public MultiSelectionPopup(Set pids) {
            super();
            JMenuItem i0 = new JMenuItem(new ViewObject(pids));
            i0.setMnemonic(KeyEvent.VK_O);
            i0.setToolTipText("Launches a viewer for the selected objects.");
            JMenuItem i1 = new JMenuItem(new ViewObjectXML(pids));
            i1.setMnemonic(KeyEvent.VK_V);
            i1.setToolTipText("Launches an XML viewer for the selected objects.");
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.