Examples of ObjectAdapter

  • net.sf.myway.ui.ObjectAdapter
    @author Andreas Beckers @version $Revision$
  • org.apache.isis.core.metamodel.adapter.ObjectAdapter
    Adapters to domain objects, where the application is written in terms of domain objects and those objects are represented within the NOF through these adapter, and not directly.
  • org.apache.isis.metamodel.adapter.ObjectAdapter
  • org.apache.isis.noa.adapter.ObjectAdapter
  • org.apache.isis.object.ObjectAdapter

  • Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter

        public ObjectAdapter getObjectAndMapIfRequired(final Oid oid) {
            final Object pojo = getObjectInstances().get(oid);
            if (pojo == null) {
                return null;
            }
            final ObjectAdapter adapterLookedUpByPojo = getAdapterManager().getAdapterFor(pojo);
            if (adapterLookedUpByPojo != null) {
                return adapterLookedUpByPojo;
            }
            final ObjectAdapter adapterLookedUpByOid = getAdapterManager().getAdapterFor(oid);
            if (adapterLookedUpByOid != null) {
                return adapterLookedUpByOid;
            }
            return getPersistenceSession().mapRecreatedPojo(oid, pojo);
        }
    View Full Code Here

    Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter

            debug.indent();
            if (getObjectInstances().size() == 0) {
                debug.appendln("no instances");
            }
            for (final Oid oid : getObjectInstances().keySet()) {
                final ObjectAdapter objectAdapter = getObjectAndMapIfRequired(oid);
                final String title = objectAdapter.titleString();
                final Object object = getObjectInstances().get(oid);
                debug.appendln(oid.toString(), object + " (" + title + ")");
            }
            debug.appendln();
            debug.unindent();
    View Full Code Here

    Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter

                if (LOG.isDebugEnabled()) {
                    LOG.debug("recreating adapter: oid=" + oid);
                }
                final Object pojo = objectStoreInstances.getPojo(oid);

                final ObjectAdapter existingAdapterLookedUpByPojo = getAdapterManager().getAdapterFor(pojo);
                if (existingAdapterLookedUpByPojo != null) {
                    // this could happen if we rehydrate a persisted object that
                    // depends on another persisted object
                    // not yet rehydrated.
                    getPersistenceSession().removeAdapter(existingAdapterLookedUpByPojo);
                }

                final ObjectAdapter existingAdapterLookedUpByOid = getAdapterManager().getAdapterFor(oid);
                if (existingAdapterLookedUpByOid != null) {
                    throw new IsisException("A mapping already exists for " + oid + ": " + existingAdapterLookedUpByOid);
                }

                final ObjectAdapter recreatedAdapter = getPersistenceSession().mapRecreatedPojo(oid, pojo);

                final Version version = objectStoreInstances.getVersion(oid);
                recreatedAdapter.setVersion(version);
            }
        }
    View Full Code Here

    Examples of org.apache.isis.metamodel.adapter.ObjectAdapter

            Set<InvalidConstraint<?>> constraints = validator.validateValue(memberName, proposed);
            return asString(memberName, constraints);
        }

        private Validator<?> getTargetValidator(final ValidityContext<? extends ValidityEvent> validityContext) {
            final ObjectAdapter targetNO = validityContext.getTarget();
            final Object targetObject = targetNO.getObject();
            final Class<?> cls = targetObject.getClass();
            return ValidationProviderFactory.createValidator(cls);
        }
    View Full Code Here

    Examples of org.apache.isis.noa.adapter.ObjectAdapter

            TestProxySpecification spec = system.getSpecification(String.class);
            assertEquals(spec, field.getSpecification());
        }

        public void testIsEmpty() throws Exception {
            ObjectAdapter inObject = system.createPersistentTestObject();
            assertTrue(field.isEmpty(inObject));
        }
    View Full Code Here

    Examples of org.apache.isis.object.ObjectAdapter

            View[] views = view.getSubviews();

            for (int i = 0; i < views.length; i++) {
                View v = views[i];
                ObjectAdapter object = ((ObjectContent) v.getContent()).getObject();

                if (field == null) {
                    ObjectSpecification nc = object.getSpecification();
                    ObjectField[] fields = nc.getFields();

                    for (int j = 0; j < fields.length; j++) {
                        field = fields[j];

                        if (field.getType().isOfType(Isis.getSpecificationLoader().loadSpecification(TimePeriod.class))) {
                            break;
                        }
                    }
                }

                TimePeriod tp = (TimePeriod) object.getField(field);
          int y = (int) (((tp.getStart().longValue() - from) * maxHeight) / to);
                int height = (int) (((tp.getEnd().longValue() - tp.getStart().longValue()) * maxHeight) / to);

                v.setLocation(new Location(x, y));
                v.setSize(new Size(width, height));
    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.