Q: Returning Map from a protected java method protected void createIdUpdateMapForMapObjects()
{
    for (Iterator it = d_mapObjectList.iterator(); it.hasNext(); )
    {
        MapObject mapObj       = (MapObject) it.next();
        long      transientId  = mapObj.id();
        long      persistentId = g.getNewId();
        boolean minDPTObjectIdSet = false;
        long      minDPTObjectId ;
        long      maxDPTObjectId = g.upperBound();

        if(minDPTObjectIdSet == false) {
            minDPTObjectId = persistentId;
            System.out.println("min dpt" + minDPTObjectId);
            System.out.println("max dpt" + maxDPTObjectId);
            //insertDPTObjectId("minDPTObjectId", minDPTObjectId, "Starting change ID");
            //insertDPTObjectId("maxDPTObjectId", maxDPTObjectId, "End change ID");
            minDPTObjectIdSet = true;

        }

public Map<String, Long> getMinMaxDPTObjectId(String Name, long minmaxDPTObjectId) {
    Map<String,Long> minMaxDPTObjectId = new HashMap<String,Long>();

    minMaxDPTObjectId.put("minDPTObjectId",minDPTObjectId);
        //minDPTObjectId which i need to get from above method
    minMaxDPTObjectId.put("maxDPTObjectId",maxDPTObjectId);
        //same 

    return minMaxDPTObjectId;
}

I'm unable to return the values of minDPTObjectId and maxDPTObjectId to a Map that have to be used in another package
I think returning a map would be a good option but stuck ob how to do it

A: public Map createIdUpdateMapForMapObjects()
{
    IdGenerator g = d_idm.getGenerator(OraclePropertyAdapter.NEXTID);    // could be null
    Map<String, Long> minMaxDPTObjectIdMap             = null;
    for (Iterator it = d_mapObjectList.iterator(); it.hasNext(); )
    {
        MapObject mapObj       = (MapObject) it.next();
        long      transientId  = mapObj.id();
        long      persistentId = g.getNewId();
        boolean minDPTObjectIdSet = false;
        long      minDPTObjectId ;
        long      maxDPTObjectId = g.upperBound();
        minMaxDPTObjectIdMap = new HashMap<String, Long>();
        minMaxDPTObjectIdMap.put("maxDPTObjectId",maxDPTObjectId);

        if(minDPTObjectIdSet == false) {
            minDPTObjectId = persistentId;
            minMaxDPTObjectIdMap.put("minDPTObjectId",minDPTObjectId);
            minDPTObjectIdSet = true;
}
           return minMaxDPTObjectIdMap;

does this appear good?
