Package org.apache.isis.core.metamodel.adapter.oid

Examples of org.apache.isis.core.metamodel.adapter.oid.Oid$Matchers


    public void initializeField(final ObjectAdapter object, final Results rs) {
        final String className = rs.getString(classnameColumn);
        if (className != null) {
            final ObjectSpecification specification = getReflector().loadSpecification(className);

            final Oid oid = recreateOid(rs, specification);

            final ObjectAdapter reference = getAdapter(specification, oid);
            ((OneToOneAssociation) field).initAssociation(object, reference);
        }
    }
View Full Code Here


            // here.
        }
    }

    private ObjectAdapter loadMappedObject(final DatabaseConnector connector, final ObjectSpecification cls, final Results rs) {
        final Oid oid = idMapping.recreateOid(rs, specification);
        final ObjectAdapter adapter = getAdapter(cls, oid);

        if (adapter.canTransitionToResolving()) {
            loadFields(adapter, rs);
            loadCollections(connector, adapter); // KAM
View Full Code Here

            connector.addToQueryValues(primaryKey(oid));
        }
    }

    public ObjectAdapter initializeField(final Results rs) {
        final Oid oid = recreateOid(rs, specification);
        if (oid != null) {
            if (specification.isAbstract()) {
                throw new SqlObjectStoreException("NOT DEALING WITH POLYMORPHIC ASSOCIATIONS");
            } else {
                return getAdapter(specification, oid);
View Full Code Here

        sql.append(" where ");
        appendCollectionWhereValues(connector, parent, sql);

        final Results rs = connector.select(sql.toString());
        while (rs.next()) {
            final Oid oid = idMappingAbstract.recreateOid(rs, specification);
            final ObjectAdapter element = getAdapter(specification, oid);
            loadFields(element, rs, fieldMappingByField);
            LOG.debug("  element  " + element.getOid());
            list.add(element);
        }
View Full Code Here

            connector.addToQueryValues(primaryKey(oid));
        }
    }

    public ObjectAdapter initializeField(final Results rs) {
        final Oid oid = recreateOid(rs, specification);
        if (oid != null) {
            if (specification.isAbstract()) {
                throw new SqlObjectStoreException("NOT DEALING WITH POLYMORPHIC ASSOCIATIONS");
            } else {
                return getAdapter(specification, oid);
View Full Code Here

        String argsStr = argsBuf.toString();
        return argsStr;
    }

    public static Bookmark bookmarkFor(final ObjectAdapter adapter) {
        final Oid oid = adapter.getOid();
        if(!(oid instanceof RootOid)) {
            return null;
        }
        final RootOid rootOid = (RootOid) oid;
        return rootOid.asBookmark();
View Full Code Here

     *
     * @see #remapAsPersistent(ObjectAdapter)
     */
    @Override
    public void remapAsPersistent(final ObjectAdapter adapter) {
        final Oid transientOid = adapter.getOid();
        adapterManager.remapAsPersistent(adapter, null);
        final Oid persistentOid = adapter.getOid();
        persistentByTransient.put(transientOid, persistentOid);
    }
View Full Code Here

            writeValueField(writer, field, entry);
        }
    }

    private void writeAssociationField(final Writer writer, final String field, final Object entry) throws IOException {
        final Oid rootOidDefault = (Oid)entry;
        Assert.assertFalse(rootOidDefault.isTransient());
        writer.append("  <association");
        Utils.appendAttribute(writer, "field", field);
        Utils.appendAttribute(writer, "oid", rootOidDefault.enString(getOidMarshaller()));
        writer.append("/>\n");
    }
View Full Code Here

        for (final Object servicePojo : servicesInjector.getRegisteredServices()) {
            final String id = ServiceUtil.id(servicePojo);
            final Class<? extends Object> serviceClass = servicePojo.getClass();
            final ObjectSpecification serviceSpecification = getSpecificationLoader().loadSpecification(serviceClass);
            final String serviceClassName = serviceClass.getName();
            final Oid oidForService = getOidForService(serviceSpecification);
            final String serviceId = id + (id.equals(serviceClassName) ? "" : " (" + serviceClassName + ")");
            debug.appendln(oidForService != null ? oidForService.toString() : "[NULL]", serviceId);
        }
        debug.appendln();

        debug.appendTitle("Persistor");
        getTransactionManager().debugData(debug);
View Full Code Here

    //region > canEagerlyRender
    private Set<Oid> rendered = Sets.newHashSet();
    @Override
    public boolean canEagerlyRender(ObjectAdapter objectAdapter) {
        final Oid oid = objectAdapter.getOid();
        return rendered.add(oid);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.adapter.oid.Oid$Matchers

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.