PoolManager for a DataContext or DataObject?

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Apr 14 2004 - 12:35:16 EDT

  • Next message: Andrus Adamchik: "Re: PoolManager for a DataContext or DataObject?"

    How can I determine the PoolManager for a DataContext or DataObject? I have
    ignored this until today since the code is only used in my unit tests.

    Up to this point, I've been using

                    DataObject aDataObject = getNormalUser(aDataContext);
                    ObjEntity anObjEntity =
    aDataContext.getEntityResolver().lookupObjEntity(aDataObject.getObjectId().getObjClass());
                    DataNode dataNode = aDataContext.dataNodeForObjEntity(anObjEntity);
                    PoolManager dataSource = (PoolManager) dataNode.getDataSource();

    However, DataContext.dataNodeForObjEntity() is marked as follows, and I
    don't see how to get to a DataMap from a DataContext or DataObject.

         *..eprecated Since 1.1 use {@link #lookupDataNode(DataMap)} since
         * queries are not necessarily based on an ObjEntity.



    This archive was generated by hypermail 2.0.0 : Wed Apr 14 2004 - 12:33:28 EDT