Commit 4516418b by nixonrodrigues

ATLAS-2272 :- Save the state of dragged columns using save search API.

parent 6eff6b67
......@@ -184,6 +184,14 @@
"isIndexable": false,
"isOptional": false,
"isUnique": false
},
{
"name": "uiParameters",
"typeName": "string",
"cardinality": "SINGLE",
"isIndexable": false,
"isOptional": true,
"isUnique": false
}
]
}
......
......@@ -49,6 +49,7 @@ public class AtlasUserSavedSearch extends AtlasBaseModelObject implements Serial
private String name;
private SavedSearchType searchType;
private SearchParameters searchParameters;
private String uiParameters;
public AtlasUserSavedSearch() {
......@@ -70,6 +71,11 @@ public class AtlasUserSavedSearch extends AtlasBaseModelObject implements Serial
setSearchParameters(searchParameters);
}
public AtlasUserSavedSearch(String ownerName, String name, SavedSearchType searchType, SearchParameters searchParameters, String uiParameters) {
this(ownerName, name, searchType, searchParameters);
setUiParameters(uiParameters);
}
public String getOwnerName() {
return this.ownerName;
......@@ -103,6 +109,14 @@ public class AtlasUserSavedSearch extends AtlasBaseModelObject implements Serial
this.searchParameters = searchParameters;
}
public String getUiParameters() {
return uiParameters;
}
public void setUiParameters(String uiParameters) {
this.uiParameters = uiParameters;
}
@Override
public StringBuilder toString(StringBuilder sb) {
sb.append(", ownerName=").append(ownerName);
......@@ -115,6 +129,8 @@ public class AtlasUserSavedSearch extends AtlasBaseModelObject implements Serial
searchParameters.toString(sb);
}
sb.append(", uiParameters=").append(uiParameters);
return sb;
}
}
......@@ -36,6 +36,7 @@ public class AtlasSavedSearchDTO extends AbstractDataTransferObject<AtlasUserSav
private static final String PROPERTY_SEARCH_PARAMETERS = "searchParameters";
private static final String PROPERTY_UNIQUE_NAME = "uniqueName";
private static final String PROPERTY_SEARCH_TYPE = "searchType";
private static final String PROPERTY_UI_PARAMETERS = "uiParameters";
public AtlasSavedSearchDTO(AtlasTypeRegistry typeRegistry) {
super(typeRegistry, AtlasUserSavedSearch.class);
......@@ -56,6 +57,8 @@ public class AtlasSavedSearchDTO extends AbstractDataTransferObject<AtlasUserSav
savedSearch.setSearchParameters(AtlasType.fromJson(jsonSearchParams, SearchParameters.class));
}
savedSearch.setUiParameters((String) entity.getAttribute(PROPERTY_UI_PARAMETERS));
return savedSearch;
}
......@@ -77,6 +80,8 @@ public class AtlasSavedSearchDTO extends AbstractDataTransferObject<AtlasUserSav
entity.setAttribute(PROPERTY_SEARCH_PARAMETERS, AtlasType.toJson(obj.getSearchParameters()));
}
entity.setAttribute(PROPERTY_UI_PARAMETERS, obj.getUiParameters());
return entity;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment