Skip to content
Snippets Groups Projects
Commit 22c0bb62 authored by buczekp's avatar buczekp
Browse files

[LMS-1507] removed trash

SVN: 15680
parent 0d77fd30
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,6 @@ import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.log4j.Logger;
import org.hibernate.FetchMode;
import org.hibernate.HibernateException;
......@@ -53,8 +52,6 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.CodeConverter;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescription;
import ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescriptionPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
......@@ -209,76 +206,6 @@ final class ExternalDataDAO extends AbstractGenericEntityDAO<ExternalDataPE> imp
return entity;
}
public List<DatasetDescription> tryToFindDatasetDescriptionsByCodes(List<String> dataSetCodes)
{
assert dataSetCodes != null : "Unspecified data set code";
// final Criterion codeEq = Restrictions.eq("code", mangledCode);
// TODO
// Hibernate bug (HHH-2676) - can't take a lock in this kind of query.
String queryString =
"select new ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescription(d.code, d.location, d.sampleInternal.code, "
+ "d.experimentInternal.projectInternal.group.code, "
+ "d.experimentInternal.projectInternal.code, "
+ "d.experimentInternal.code, "
+ "d.dataSetType.mainDataSetPath, d.dataSetType.mainDataSetPattern, "
+ "d.experimentInternal.projectInternal.group.databaseInstance.code) "
+ "from " + TABLE_NAME + " d where d.code IN (:codes)";
Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
final List<DatasetDescription> list =
cast(session.createQuery(queryString).setParameterList("codes", dataSetCodes)
.list());
System.err.println(list.size());
for (DatasetDescription desc : list)
{
System.err.println(ReflectionToStringBuilder.toString(desc));
}
// if (operationLog.isDebugEnabled())
// {
// operationLog.debug(String.format("External data '%s' found for data set code '%s'.",
// entity, dataSetCode));
// }
return list;
}
public List<DatasetDescriptionPE> tryToFindDatasetDescriptionsByCodes(List<String> dataSetCodes)
{
assert dataSetCodes != null : "Unspecified data set code";
// final Criterion codeEq = Restrictions.eq("code", mangledCode);
// TODO
// Hibernate bug (HHH-2676) - can't take a lock in this kind of query.
String queryString =
"select new DatasetDescriptionPE(d.code, d.location, d.sampleInternal.code, "
+ "d.experimentInternal.projectInternal.group.code, "
+ "d.experimentInternal.projectInternal.code, "
+ "d.experimentInternal.code, "
+ "d.dataSetType.mainDataSetPath, d.dataSetType.mainDataSetPattern, "
+ "d.experimentInternal.projectInternal.group.databaseInstance.code) "
+ "from " + TABLE_NAME + " d where d.code IN (:codes)";
Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
final List<DatasetDescriptionPE> list =
cast(session.createQuery(queryString).setParameterList("codes", dataSetCodes)
.list());
System.err.println(list.size());
for (DatasetDescriptionPE desc : list)
{
System.err.println(ReflectionToStringBuilder.toString(desc));
}
// if (operationLog.isDebugEnabled())
// {
// operationLog.debug(String.format("External data '%s' found for data set code '%s'.",
// entity, dataSetCode));
// }
return list;
}
public List<ExternalDataPE> tryToFindFullDataSetsByCodes(Collection<String> dataSetCodes,
boolean withPropertyTypes, boolean lockForUpdate)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment