Package org.apache.isis.objectstore.sql.jdbc

Examples of org.apache.isis.objectstore.sql.jdbc.JdbcPolymorphicObjectReferenceMapping


        super(objectAssociation, parameterBase, lookup, objectMapperLookup, abstractAutoMapper, field);

        classColumnName = Sql.identifier(Sql.sqlName(getForeignKeyName() + "_cls"));
        itemIdColumnName = Sql.identifier("item_id");

        polyIdMapper = new JdbcPolymorphicObjectReferenceMapping(itemIdColumnName);
        oidGenerator = IsisContext.getPersistenceSession().getOidGenerator();
    }
View Full Code Here


        appendCollectionWhereValues(connector, parent, sql);

        final Results rs = connector.select(sql.toString());

        final SpecificationLoaderSpi reflector = IsisContext.getSpecificationLoader();
        final JdbcPolymorphicObjectReferenceMapping idMapping =
            (JdbcPolymorphicObjectReferenceMapping) idMappingAbstract;

        while (rs.next()) {
            final ObjectSpecification itemSpecification = reflector.loadSpecification(rs.getString(classColumnName));
            idMapping.setObjectSpecification(itemSpecification);

            // Load new recordSet for the actual class
            final ObjectMapping itemMapper = objectMappingLookup.getMapping(itemSpecification, connector);
            final TypedOid oid = idMapping.recreateOid(rs, itemSpecification);
            final ObjectAdapter loadedObject = itemMapper.getObject(connector, oid);

            LOG.debug("  element  " + loadedObject.getOid());

            list.add(loadedObject);
View Full Code Here

TOP

Related Classes of org.apache.isis.objectstore.sql.jdbc.JdbcPolymorphicObjectReferenceMapping

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.