Making changes to repository classes
ADD
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentSummaryEntity.java
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+/**
+ * The class for the experiment_summary view.
+ */
+@Entity
+@Table(name = "EXPERIMENT_SUMMARY")
+public class ExperimentSummaryEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "EXPERIMENT_ID")
+ private String experimentId;
+
+ @Column(name = "PROJECT_ID")
+ private String projectId;
+
+ @Column(name = "GATEWAY_ID")
+ private String gatewayId;
+
+ @Column(name = "CREATION_TIME")
+ private Timestamp creationTime;
+
+ @Column(name = "USER_NAME")
+ private String userName;
+
+ @Column(name = "EXPERIMENT_NAME")
+ private String name;
+
+ @Column(name = "DESCRIPTION")
+ private String description;
+
+ @Column(name = "EXECUTION_ID")
+ private String executionId;
+
+ @Column(name = "STATE")
+ private String state;
+
+ @Column(name = "RESOURCE_HOST_ID")
+ private String resourceHostId;
+
+ @Column(name = "TIME_OF_STATE_CHANGE")
+ private Timestamp statusUpdateTime;
+
+ public ExperimentSummaryEntity() {
+ }
+
+ public String getExperimentId() {
+ return experimentId;
+ }
+
+ public void setExperimentId(String experimentId) {
+ this.experimentId = experimentId;
+ }
+
+ public String getProjectId() {
+ return projectId;
+ }
+
+ public void setProjectId(String projectId) {
+ this.projectId = projectId;
+ }
+
+ public String getGatewayId() {
+ return gatewayId;
+ }
+
+ public void setGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ }
+
+ public Timestamp getCreationTime() {
+ return creationTime;
+ }
+
+ public void setCreationTime(Timestamp creationTime) {
+ this.creationTime = creationTime;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getExecutionId() {
+ return executionId;
+ }
+
+ public void setExecutionId(String executionId) {
+ this.executionId = executionId;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getResourceHostId() {
+ return resourceHostId;
+ }
+
+ public void setResourceHostId(String resourceHostId) {
+ this.resourceHostId = resourceHostId;
+ }
+
+ public Timestamp getStatusUpdateTime() {
+ return statusUpdateTime;
+ }
+
+ public void setStatusUpdateTime(Timestamp statusUpdateTime) {
+ this.statusUpdateTime = statusUpdateTime;
+ }
+}

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusPK.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusPK.java
@@ -29,19 +29,19 @@ public class JobStatusPK implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
- private String stateId;
+ private String statusId;
private String jobId;
private String taskId;
public JobStatusPK() {
}
- public String getStateId() {
- return stateId;
+ public String getStatusId() {
+ return statusId;
}
- public void setStateId(String stateId) {
- this.stateId = stateId;
+ public void setStatusId(String statusId) {
+ this.statusId = statusId;
}
public String getJobId() {
@@ -69,7 +69,7 @@ public class JobStatusPK implements Serializable {
}
JobStatusPK castOther = (JobStatusPK) other;
return
- this.stateId.equals(castOther.stateId)
+ this.statusId.equals(castOther.statusId)
&& this.jobId.equals(castOther.jobId)
&& this.taskId.equals(castOther.taskId);
}
@@ -77,7 +77,7 @@ public class JobStatusPK implements Serializable {
public int hashCode() {
final int prime = 31;
int hash = 17;
- hash = hash * prime + this.stateId.hashCode();
+ hash = hash * prime + this.statusId.hashCode();
hash = hash * prime + this.jobId.hashCode();
hash = hash * prime + this.taskId.hashCode();

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
@@ -511,7 +511,7 @@ public class ExperimentRepository extends ExpCatAbstractRepository<ExperimentMod
}*/
public List<ExperimentModel> getExperimentList(String fieldName, Object value) throws RegistryException {
- return getExperimentList(fieldName, value, -1, -1, null, null);
+ return getExperimentList(fieldName, value, -1, 0, null, null);
}
public List<ExperimentModel> getExperimentList(String fieldName, Object value, int limit, int offset,
@@ -522,21 +522,21 @@ public class ExperimentRepository extends ExpCatAbstractRepository<ExperimentMod
logger.debug("Search criteria is Username");
Map<String, Object> queryParameters = new HashMap<>();
queryParameters.put(DBConstants.Experiment.USER_NAME, value);
- experimentModelList = select(QueryConstants.GET_EXPERIMENTS_FOR_USER, -1, 0, queryParameters);
+ experimentModelList = select(QueryConstants.GET_EXPERIMENTS_FOR_USER, limit, offset, queryParameters);
}
else if (fieldName.equals(DBConstants.Experiment.PROJECT_ID)) {
logger.debug("Search criteria is ProjectId");
Map<String, Object> queryParameters = new HashMap<>();
queryParameters.put(DBConstants.Experiment.PROJECT_ID, value);
- experimentModelList = select(QueryConstants.GET_EXPERIMENTS_FOR_PROJECT_ID, -1, 0, queryParameters);
+ experimentModelList = select(QueryConstants.GET_EXPERIMENTS_FOR_PROJECT_ID, limit, offset, queryParameters);
}
else if (fieldName.equals(DBConstants.Experiment.PROJECT_ID)) {
logger.debug("Search criteria is GatewayId");
Map<String, Object> queryParameters = new HashMap<>();
queryParameters.put(DBConstants.Experiment.GATEWAY_ID, value);
- experimentModelList = select(QueryConstants.GET_EXPERIMENTS_FOR_GATEWAY_ID, -1, 0, queryParameters);
+ experimentModelList = select(QueryConstants.GET_EXPERIMENTS_FOR_GATEWAY_ID, limit, offset, queryParameters);
}
else {

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepository.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentSummaryRepository.java
package org.apache.airavata.registry.core.repositories.expcatalog;
-public class ExperimentSummaryRepository {
+import org.apache.airavata.model.experiment.ExperimentStatistics;
+import org.apache.airavata.model.experiment.ExperimentSummaryModel;
+import org.apache.airavata.model.status.ExperimentState;
+import org.apache.airavata.registry.core.entities.expcatalog.ExperimentSummaryEntity;
+import org.apache.airavata.registry.core.utils.DBConstants;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Timestamp;
+import java.util.List;
+import java.util.Map;
+
+public class ExperimentSummaryRepository extends ExpCatAbstractRepository<ExperimentSummaryModel, ExperimentSummaryEntity, String> {
+ private final static Logger logger = LoggerFactory.getLogger(ExperimentRepository.class);
+
+ public ExperimentSummaryRepository() { super(ExperimentSummaryModel.class, ExperimentSummaryEntity.class); }
+
+ public List<ExperimentSummaryModel> searchExperiments(Map<String, String> filters, int limit,
+ int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+ return searchAllAccessibleExperiments(null, filters, limit, offset, orderByIdentifier, resultOrderType);
+ }
+
+ public List<ExperimentSummaryModel> searchAllAccessibleExperiments(List<String> accessibleExperimentIds, Map<String, String> filters, int limit,
+ int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+ String query = "SELECT DISTINCT ES FROM " + ExperimentSummaryEntity.class.getSimpleName() + " ES ";
+
+ if (!filters.isEmpty() && filters != null) {
+
+ for (String field : filters.keySet()) {
+
+ query += " WHERE ";
+
+ if (field.equals(DBConstants.Experiment.USER_NAME)) {
+ logger.debug("Filter Experiments by User");
+ query += "ES.userName LIKE :" + filters.get(field) + " AND ";
+ }
+
+ else if (field.equals(DBConstants.Experiment.GATEWAY_ID)) {
+ logger.debug("Filter Experiments by Gateway ID");
+ query += "ES.gatewayId LIKE :" + filters.get(field) + " AND ";
+ }
+
+ else if (field.equals(DBConstants.Experiment.PROJECT_ID)) {
+ logger.debug("Filter Experiments by Project ID");
+ query += "ES.projectId LIKE :" + filters.get(field) + " AND ";
+ }
+
+ else if (field.equals(DBConstants.Experiment.EXPERIMENT_NAME)) {
+ logger.debug("Filter Experiments by Name");
+ query += "ES.name LIKE :" + filters.get(field) + " AND ";
+ }
+
+ else if (field.equals(DBConstants.Experiment.DESCRIPTION)) {
+ logger.debug("Filter Experiments by Description");
+ query += "ES.description LIKE :" + filters.get(field) + " AND ";
+ }
+
+ else if (field.equals(DBConstants.Experiment.EXECUTION_ID)) {
+ logger.debug("Filter Experiments by Execution ID");
+ query += "ES.executionId LIKE :" + filters.get(field) + " AND ";
+ }
+
+ }
+
+ }
+
+ if (filters.get(DBConstants.ExperimentStatus.STATE) != null) {
+ logger.debug("Filter Experiments by State");
+ String state = ExperimentState.valueOf(filters.get(DBConstants.ExperimentStatus.STATE)).toString();
+ query += "ES.state LIKE :" + state + " AND ";
+ }
+
+ if (filters.get(DBConstants.ExperimentSummary.FROM_DATE) != null
+ && filters.get(DBConstants.ExperimentSummary.TO_DATE) != null) {
+
+ Timestamp fromDate = new Timestamp(Long.parseLong(filters.get(DBConstants.ExperimentSummary.FROM_DATE)));
+ Timestamp toDate = new Timestamp(Long.parseLong(filters.get(DBConstants.ExperimentSummary.TO_DATE)));
+
+ if (toDate.after(fromDate)) {
+ logger.debug("Filter Experiments by Date");
+ query += "ES.creationTime BETWEEN :" + fromDate + " AND :" + toDate + " AND ";
+ }
+
+ }
+
+ if (!accessibleExperimentIds.isEmpty() && accessibleExperimentIds != null) {
+ logger.debug("Filter Projects by Accessible Experiment IDs");
+ query += " ES.experimentId IN :" + accessibleExperimentIds;
+ }
+
+ else {
+ logger.debug("Removing the last operator from the query");
+ query = query.substring(0, query.length() - 5);
+ }
+
+ List<ExperimentSummaryModel> experimentSummaryModelList = select(query, offset);
+ return experimentSummaryModelList;
+ }
+
+ public ExperimentStatistics getExperimentStatistics(Map<String,String> filters) throws RegistryException {
+
+ try {
+
+ ExperimentStatistics experimentStatistics = new ExperimentStatistics();
+ String gatewayId = filters.get(DBConstants.Experiment.GATEWAY_ID);
+ String userName = filters.get(DBConstants.Experiment.USER_NAME);
+ String applicationName = filters.get(DBConstants.Experiment.EXECUTION_ID);
+ String resourceHostName = filters.get(DBConstants.Experiment.RESOURCE_HOST_ID);
+ Timestamp fromDate = new Timestamp(Long.parseLong(filters.get(DBConstants.ExperimentSummary.FROM_DATE)));
+ Timestamp toDate = new Timestamp(Long.parseLong(filters.get(DBConstants.ExperimentSummary.TO_DATE)));
+
+ List<ExperimentSummaryModel> allExperiments = getExperimentStatisticsForState(null, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName);
+ experimentStatistics.setAllExperimentCount(allExperiments.size());
+ experimentStatistics.setAllExperiments(allExperiments);
+
+ List<ExperimentSummaryModel> createdExperiments = getExperimentStatisticsForState(ExperimentState.CREATED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName);
+ createdExperiments.addAll(getExperimentStatisticsForState(ExperimentState.VALIDATED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName));
+ experimentStatistics.setCreatedExperimentCount(createdExperiments.size());
+ experimentStatistics.setCreatedExperiments(createdExperiments);
+
+ List<ExperimentSummaryModel> runningExperiments = getExperimentStatisticsForState(ExperimentState.EXECUTING, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName);
+ runningExperiments.addAll(getExperimentStatisticsForState(ExperimentState.SCHEDULED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName));
+ runningExperiments.addAll(getExperimentStatisticsForState(ExperimentState.LAUNCHED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName));
+ experimentStatistics.setRunningExperimentCount(runningExperiments.size());
+ experimentStatistics.setRunningExperiments(runningExperiments);
+
+ List<ExperimentSummaryModel> completedExperiments = getExperimentStatisticsForState(ExperimentState.COMPLETED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName);
+ experimentStatistics.setCompletedExperimentCount(completedExperiments.size());
+ experimentStatistics.setCompletedExperiments(completedExperiments);
+
+ List<ExperimentSummaryModel> failedExperiments = getExperimentStatisticsForState(ExperimentState.FAILED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName);
+ experimentStatistics.setFailedExperimentCount(failedExperiments.size());
+ experimentStatistics.setFailedExperiments(failedExperiments);
+
+ List<ExperimentSummaryModel> cancelledExperiments = getExperimentStatisticsForState(ExperimentState.CANCELED, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName);
+ cancelledExperiments.addAll(getExperimentStatisticsForState(ExperimentState.CANCELING, gatewayId,
+ fromDate, toDate, userName, applicationName, resourceHostName));
+ experimentStatistics.setCancelledExperimentCount(cancelledExperiments.size());
+ experimentStatistics.setCancelledExperiments(cancelledExperiments);
+
+ return experimentStatistics;
+ }
+
+ catch (RegistryException e) {
+ logger.error("Error while retrieving experiment statistics from registry", e);
+ throw new RegistryException(e);
+ }
+
+ }
+
+ protected List<ExperimentSummaryModel> getExperimentStatisticsForState(ExperimentState experimentState, String gatewayId, Timestamp fromDate, Timestamp toDate,
+ String userName, String applicationName, String resourceHostName) throws RegistryException {
+
+ String query = "SELECT DISTINCT ES FROM " + ExperimentSummaryEntity.class.getSimpleName() + " ES WHERE ";
+
+ if (experimentState != null) {
+ query += "ES.state LIKE :" + experimentState.toString() + " AND ";
+ }
+
+ query += "ES.creationTime BETWEEN :" + fromDate + " AND :" + toDate + " AND " +
+ "ES.gatewayId LIKE :" + gatewayId + " ";
+
+ if (userName != null) {
+ query += "AND ES.userName LIKE :" + userName + " ";
+ }
+
+ if (applicationName != null) {
+ query += "AND ES.executionId LIKE :" + applicationName + " ";
+ }
+
+ if (resourceHostName != null) {
+ query += "AND ES.resourceHostId LIKE :" + resourceHostName + " ";
+ }
+
+ query += "ORDER BY ES.creationTime DESC";
+ List<ExperimentSummaryModel> experimentSummaryModelList = select(query, 0);
+ return experimentSummaryModelList;
+ }
+
}

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ProjectRepository.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ProjectRepository.java
@@ -93,6 +93,11 @@ public class ProjectRepository extends ExpCatAbstractRepository<Project, Project
}
+ else {
+ logger.error("Unsupported field name for Project module.");
+ throw new IllegalArgumentException("Unsupported field name for Project module.");
+ }
+
return null;
}
@@ -110,52 +115,61 @@ public class ProjectRepository extends ExpCatAbstractRepository<Project, Project
return projectIds;
}
- public List<Project> searchProjects(Map<String, String> filters) throws RegistryException {
- return searchProjects(filters, -1, -1, null, null);
+ public List<Project> searchProjects(Map<String, String> filters, int limit,
+ int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+ return searchAllAccessibleProjects(null, filters, limit, offset, orderByIdentifier, resultOrderType);
}
- public List<Project> searchProjects(Map<String, String> filters, int limit,
+ public List<Project> searchAllAccessibleProjects(List<String> accessibleProjectIds, Map<String, String> filters, int limit,
int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
- Map<String, Object> queryParameters = new HashMap<>();
+ String query = "SELECT DISTINCT P FROM " + ProjectEntity.class.getSimpleName() + " P ";
+
+ if (!filters.isEmpty() && filters != null) {
+
for (String field : filters.keySet()) {
+ query += " WHERE ";
+
if (field.equals(DBConstants.Project.GATEWAY_ID)) {
logger.debug("Filter Projects by Gateway ID");
- queryParameters.put(DBConstants.Project.GATEWAY_ID, filters.get(field));
- }
-
- else if (field.equals(DBConstants.Project.PROJECT_NAME)) {
- logger.debug("Filter Projects by Project Name");
- queryParameters.put(DBConstants.Project.PROJECT_NAME, filters.get(field));
+ query += "P.gatewayId LIKE :" + filters.get(field) + " AND ";
}
else if (field.equals(DBConstants.Project.OWNER)) {
logger.debug("Filter Projects by Owner");
- queryParameters.put(DBConstants.Project.OWNER, filters.get(field));
+ query += "P.owner LIKE :" + filters.get(field) + " AND ";
+ }
+
+ else if (field.equals(DBConstants.Project.PROJECT_NAME)) {
+ logger.debug("Filter Projects by Project Name");
+ query += "P.name LIKE :" + filters.get(field) + " AND ";
}
else if (field.equals(DBConstants.Project.DESCRIPTION)) {
logger.debug("Filter Projects by Description");
- queryParameters.put(DBConstants.Project.DESCRIPTION, filters.get(field));
+ query += "P.description LIKE :" + filters.get(field) + " AND ";
}
+
+ else {
+ logger.error("Unsupported field name for Project module.");
+ throw new IllegalArgumentException("Unsupported field name for Project module.");
}
- List<Project> projectList = select(QueryConstants.SEARCH_FOR_PROJECTS, -1, 0, queryParameters);
- return projectList;
}
- public List<Project> searchAllAccessibleProjects(List<String> accessibleProjectIds, Map<String, String> filters, int limit,
- int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
- List<Project> projectList = new ArrayList<>();
- for (Project project : searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType)) {
+ }
- if (accessibleProjectIds.contains(project.getProjectID())) {
- logger.debug("Project is accessible");
- projectList.add(project);
+ if (!accessibleProjectIds.isEmpty() && accessibleProjectIds != null) {
+ logger.debug("Filter Projects by Accessible Project IDs");
+ query += " P.projectId IN :" + accessibleProjectIds;
}
+ else {
+ logger.debug("Removing the last operator from the query");
+ query = query.substring(0, query.length() - 5);
}
+ List<Project> projectList = select(query, offset);
return projectList;
}

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/DBConstants.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/DBConstants.java
@@ -91,13 +91,24 @@ public class DBConstants {
public static final String OWNER = "owner";
public static final String PROJECT_NAME = "name";
public static final String DESCRIPTION = "description";
- public static final String ACCESSIBLE_PROJECT_IDS = "accessibleProjectIds";
}
public static class Experiment {
public static final String USER_NAME = "userName";
public static final String PROJECT_ID = "projectId";
public static final String GATEWAY_ID = "gatewayId";
+ public static final String EXPERIMENT_ID = "experimentId";
+ public static final String EXPERIMENT_NAME = "experimentName";
+ public static final String DESCRIPTION = "description";
+ public static final String EXECUTION_ID = "executionId";
+ public static final String CREATION_TIME = "creationTime";
+ public static final String RESOURCE_HOST_ID = "resourceHostId";
+ }
+
+ public final class ExperimentStatus {
+ public static final String EXPERIMENT_ID = "experimentId";
+ public static final String STATE = "state";
+ public static final String REASON = "reason";
}
public static class Process {
@@ -113,6 +124,11 @@ public class DBConstants {
public static final String TASK_ID = "taskId";
}
+ public static class ExperimentSummary {
+ public static final String FROM_DATE = "fromDate";
+ public static final String TO_DATE = "toDate";
+ }
+
public static class UserComputeResourcePreference {
public static final String USER_ID = "userId";
public static final String GATEWAY_ID = "gatewayId";

MODIFY
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/QueryConstants.java
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/QueryConstants.java
@@ -111,11 +111,6 @@ public interface QueryConstants {
"WHERE N.gatewayId LIKE :" + DBConstants.Notification.GATEWAY_ID;
String GET_ALL_PROJECTS = "SELECT P FROM " + ProjectEntity.class.getSimpleName() + " P";
- String SEARCH_FOR_PROJECTS = "SELECT DISTINCT P FROM " + ProjectEntity.class.getSimpleName() + " P " +
- "WHERE P.gatewayId LIKE :" + DBConstants.Project.GATEWAY_ID + " AND " +
- "P.owner LIKE :" + DBConstants.Project.OWNER + " AND " +
- "P.name LIKE :" + DBConstants.Project.PROJECT_NAME + " AND " +
- "P.description LIKE :" + DBConstants.Project.DESCRIPTION;
String GET_EXPERIMENTS_FOR_USER = "SELECT E FROM " + ExperimentEntity.class.getSimpleName() + " E " +
"WHERE E.userName LIKE :" + DBConstants.Experiment.USER_NAME;

MODIFY
modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
<class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentInputEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentOutputEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentStatusEntity</class>
+ <class>org.apache.airavata.registry.core.entities.expcatalog.ExperimentSummaryEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.GatewayEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.GatewayWorkerEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.JobEntity</class>

Making changes to repository classes