Package org.apache.cayenne

Examples of org.apache.cayenne.ValueHolder


        if (newValue instanceof Fault) {
            super.writePropertyDirectly(object, null, newValue);
        }
        else {
            // must resolve value holder...
            ValueHolder holder = (ValueHolder) readProperty(object);
            holder.setValueDirectly(newValue);
        }
    }
View Full Code Here


    ValueHolder getWrappedValueHolder() {
        return (list instanceof ValueHolder) ? (ValueHolder) list : null;
    }

    public boolean isFault() {
        ValueHolder h = getWrappedValueHolder();
        return (h != null) ? h.isFault() : false;
    }
View Full Code Here

        ValueHolder h = getWrappedValueHolder();
        return (h != null) ? h.isFault() : false;
    }

    public Object setValueDirectly(Object value) throws CayenneRuntimeException {
        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.setValueDirectly(value) : null;
    }
View Full Code Here

        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.setValueDirectly(value) : null;
    }

    public Object setValue(Object value) throws CayenneRuntimeException {
        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.setValue(value) : null;
    }
View Full Code Here

        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.setValue(value) : null;
    }

    public Object getValue() throws CayenneRuntimeException {
        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.getValue() : null;
    }
View Full Code Here

        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.getValue() : null;
    }
   
    public Object getValueDirectly() throws CayenneRuntimeException {
        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.getValueDirectly() : null;
    }
View Full Code Here

        ValueHolder h = getWrappedValueHolder();
        return h != null ? h.getValueDirectly() : null;
    }

    public void invalidate() {
        ValueHolder h = getWrappedValueHolder();
        if (h != null) {
            h.invalidate();
        }
    }
View Full Code Here

        assertEquals(1, results.size());

        ClientMtTable2 result = (ClientMtTable2) results.get(0);

        ValueHolder holder = result.getTable1Direct();
        assertNotNull(holder);
        assertTrue(holder instanceof PersistentObjectHolder);
        PersistentObjectHolder objectHolder = (PersistentObjectHolder) holder;
        assertFalse(objectHolder.isFault());
View Full Code Here

                assertEquals(3, objects.size());

                Iterator<?> it = objects.iterator();
                while (it.hasNext()) {
                    Artist a = (Artist) it.next();
                    ValueHolder list = (ValueHolder) a.getPaintingArray();

                    assertNotNull(list);

                    // intermediate relationship is not fetched...
                    assertTrue(list.isFault());
                }

                // however both galleries must be in memory...
                DataObject g1 = (DataObject) context.getGraphManager().getNode(
                        new ObjectId("Gallery", Gallery.GALLERY_ID_PK_COLUMN, 33001));
View Full Code Here

        if (newValue instanceof Fault) {
            super.writePropertyDirectly(object, null, newValue);
        }
        else {
            // must resolve value holder...
            ValueHolder holder = (ValueHolder) readProperty(object);
            holder.setValueDirectly(newValue);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.ValueHolder

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.