Merge "Issue #765 fix so data can be retrieved with or without hdfFileId" into development

Former-commit-id: aa6c81a2c7 [formerly aa6c81a2c7 [formerly 29f61577c289229802f89b96b53735782986366b]]
Former-commit-id: cee183e89c
Former-commit-id: 80faa5abf8
This commit is contained in:
Richard Peter 2012-06-19 09:21:24 -05:00 committed by Gerrit Code Review
commit 19798acee1
2 changed files with 19 additions and 2 deletions

View file

@ -52,6 +52,8 @@ public abstract class ServerSpecificPersistablePluginDataObject extends
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Integer hdfFileId;
/** /**
* Constructor * Constructor
*/ */
@ -66,4 +68,21 @@ public abstract class ServerSpecificPersistablePluginDataObject extends
super(); super();
} }
// TODO Setting hdf file id on ingest has been disabled in preparation
// of removing it altogether since it is OBE. After deployed sites have
// had this version for long enough that all data with hdfFileId has null
// hdfFileIds, then the getters/setters should be removed everywhere
// and this class can be deleted from the inheritance hierarchy. An
// update script will be needed at that time to drop the hdfFileId column.
@Override
public Integer getHdfFileId() {
return hdfFileId;
}
@Override
public void setHdfFileId(Integer hdfFileId) {
this.hdfFileId = hdfFileId;
}
} }

View file

@ -56,7 +56,6 @@ import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.time.util.TimeUtil; import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.FileUtil; import com.raytheon.uf.common.util.FileUtil;
import com.raytheon.uf.edex.core.EDEXUtil;
import com.raytheon.uf.edex.core.EdexException; import com.raytheon.uf.edex.core.EdexException;
import com.raytheon.uf.edex.core.props.PropertiesFactory; import com.raytheon.uf.edex.core.props.PropertiesFactory;
import com.raytheon.uf.edex.database.DataAccessLayerException; import com.raytheon.uf.edex.database.DataAccessLayerException;
@ -201,7 +200,6 @@ public abstract class PluginDao extends CoreDao {
for (PluginDataObject pdo : records) { for (PluginDataObject pdo : records) {
if (pdo instanceof IPersistable) { if (pdo instanceof IPersistable) {
IPersistable persistable = (IPersistable) pdo; IPersistable persistable = (IPersistable) pdo;
persistable.setHdfFileId(EDEXUtil.getServerId());
// get the directory // get the directory
String directory = HDF5_DIR String directory = HDF5_DIR