private void init(int maxResults, int maxSecondsPerSession, boolean indexDCFields) throws Exception { m_repo = new MockRepositoryReader(); m_impl = new FieldSearchSQLImpl(cPool, m_repo, maxResults, maxSecondsPerSession, indexDCFields); }
new FieldSearchSQLImpl(cPool, doManager, maxResults,
new FieldSearchSQLImpl(cPool, doManager, maxResults,
private void updateRecord(ObjectData objectData, boolean longFields) throws ServerException { // Create a DC datastream if appropriate. DatastreamXMLMetadata dcmd = null; if (objectData.getDcPayload() != null) { dcmd = new DatastreamXMLMetadata(); dcmd.DatastreamID = "DC"; dcmd.DSCreateDT = objectData.getDcModifiedDate(); dcmd.xmlContent = objectData.getDcPayload().getBytes(); } // Create the object and populate it. BasicDigitalObject theObject = new BasicDigitalObject(); theObject.setPid(objectData.getPid()); theObject.setLabel(objectData.getLabel()); theObject.setState(objectData.getState()); theObject.setOwnerId(objectData.getOwnerId()); theObject.setCreateDate(objectData.getCreateDate()); theObject.setLastModDate(objectData.getLastModDate()); if (dcmd != null) { theObject.addDatastreamVersion(dcmd, false); } // Create the test instance. FieldSearchSQLImpl fssi = new FieldSearchSQLImpl(this.connectionPool, this.mockRepositoryReader, 50, 50, longFields); // And do the update. fssi.update(new MockDOReader(theObject)); }