Creating multiple datamaps on the fly

From: Lawrence Gerstley (lawger..mail.com)
Date: Thu Jun 04 2009 - 03:38:44 EDT

  • Next message: Andrey Razumovsky: "Re: Creating multiple datamaps on the fly"

    Hello,

    I'm trying to create multiple DataMaps and attach them to my
    DataDomain on the fly in an application. The DataMap itself that I
    created with the modeler is fine, but I want to be able to create new
    ones on demand to point to a new table set in my db. So, my DataMap
    might consist of DbEntities whose prefixes all start with "lba1_". I
    can iterate through the map attached to the domain loaded up like so:
    ================================================================
    for (DbEntity entity : currentMap.getDbEntities()) {
       if (entity.getName().indexOf("_") > 0) {
         entity.setName(entity.getName().replaceFirst(".*_",
    instancePrefix + "_"));
       }
    }
    ================================================================
    I'd like to clone the DataMap and then iterate through it with the
    code above, and then add that DataMap to the DataDomain. Is that
    possible?

    Thanks,

    Lawrence



    This archive was generated by hypermail 2.0.0 : Thu Jun 04 2009 - 03:39:24 EDT