code: public DirRecord newRecord(String entryDn) throws NamingException {
      DirRecord rec = new BasicDirRecord();
      rec.setDn(entryDn);
      return rec;
    }
docs: newRecord - Return a record which can have attribute values added.
  create should be called to create the directory entry.
  
  @param entryDn
  @return DirRecord
  @throws NamingException