Skip to content

Commit ba7dfe1

Browse files
committed
convenience method for lookups
SVN r64445 |2019-09-06 16:10:43 +0000
1 parent 7f4d136 commit ba7dfe1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

java/src/org/labkey/remoteapi/domain/PropertyDescriptor.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class PropertyDescriptor extends ResponseObject
1717
private Boolean _dimension = false;
1818
private String _propertyURI;
1919
private String _rangeURI;
20+
private String _lookupSchema;
21+
private String _lookupQuery;
22+
private String _lookupContainer;
2023

2124
public PropertyDescriptor()
2225
{
@@ -84,9 +87,28 @@ public JSONObject toJSONObject()
8487
result.put("propertyURI", _propertyURI);
8588
result.put("rangeURI", _rangeURI);
8689

90+
if (_lookupQuery != null && _lookupSchema != null)
91+
{
92+
result.put("lookupSchema", _lookupSchema);
93+
result.put("lookupQuery", _lookupQuery);
94+
result.put("lookupContainer", _lookupContainer);
95+
}
8796
return result;
8897
}
8998

99+
/**
100+
* Convenience function for creating lookups
101+
* @param schema
102+
* @param query
103+
* @param container set to null for current folder
104+
*/
105+
public void setLookup(String schema, String query, String container)
106+
{
107+
_lookupSchema = schema;
108+
_lookupQuery = query;
109+
_lookupContainer = container;
110+
}
111+
90112
public String getName()
91113
{
92114
return _name;

0 commit comments

Comments
 (0)