Project

General

Profile

« Previous | Next » 

Revision 6744

refactor Metacat access handling to be on a per-revision basis so that it more closely aligns with the DataONE approach
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5560

View differences:

AssociateAccessPolicy.java
177 177
    ResultSet rs=null;
178 178
    
179 179
    //the query stirng
180
    String query="SELECT docid from xml_access";
180
    String query="SELECT id.docid from xml_access xa, identifier id where xa.guid = id.guid";
181 181
    try
182 182
    {
183 183
      pStmt=conn.prepareStatement(query);
......
409 409
            docId=(String)docList.nextElement();
410 410
            dataSetId=(String)docIdMapDataSetId.get(docId);
411 411
            query="select accessfileid, principal_name,permission,perm_type,"
412
                +"perm_order,begin_time,end_time,ticket_count from xml_access "
413
                +"where docid =?";
412
                +"perm_order,begin_time,end_time,ticket_count from xml_access xa, identifier id "
413
                +"where id.docid = ? and id.guid = xa.guid";
414 414
            pStmt=conn.prepareStatement(query);
415 415
            //bind the value to query
416 416
            pStmt.setString(1, dataSetId);

Also available in: Unified diff