code: @Programmatic
      public String getId() {
          Object objectId = JDOHelper.getObjectId(this);
          if (objectId == null) {
              return "";
          }
          String objectIdStr = objectId.toString();
          final String id = objectIdStr.split("\\[OID\\]")[0];
          return id;
      }
docs: region > id (programmatic, for comparison)