org.labkey.remoteapi.query.GetQueryDetailsResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of labkey-client-api Show documentation
Show all versions of labkey-client-api Show documentation
The client-side library for Java developers is a separate JAR from the LabKey Server code base. It can be used by any Java program, including another Java web application.
/*
* Copyright (c) 2008-2014 LabKey Corporation
*
* Licensed 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.labkey.remoteapi.query;
import org.json.JSONObject;
import org.labkey.remoteapi.CommandResponse;
import org.labkey.remoteapi.ResponseObject;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Represents the response from a GetQueriesCommand.
*/
public class GetQueryDetailsResponse extends CommandResponse
{
public GetQueryDetailsResponse(String text, int statusCode, String contentType, JSONObject json)
{
super(text, statusCode, contentType, json);
}
/**
* Returns the schema name the query in this response belongs to.
* @return The schema name.
*/
public String getSchemaName()
{
return getProperty("schemaName");
}
/**
* Returns the query name that is described by this response
* @return The query name.
*/
public String getName()
{
return getProperty("name");
}
/**
* Returns the description of the query described by this response
* @return The query description.
*/
public String getDescription()
{
return getProperty("description");
}
/**
* Returns the title of the query described by this response (often the same as the name, but not always)
* @return The query title.
*/
public String getTitle()
{
return getProperty("title");
}
/**
* Returns the columns available in the given query name.
* @return The list of columns available within that query.
*/
public List getColumns()
{
List result = new ArrayList<>();
List