Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Creative commons Attribution-NonCommercial license. http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
 
 package base.jee.api.cassandra;
 
import base.Query;
import static base.jee.api.cassandra.util.Log.log;
public class GetSettings extends Query<KeyValue> {
	private CassandraAPI api;
	private User user;
	public GetSettings(CassandraAPI apiUser user) {
		this. = api;
		this. = user;
	}
	public GetSettings() {
	}
	public Query<KeyValuenewWithParameters(Map<StringObjectparameters) {
		return new GetSettings(
				(CassandraAPI)parameters.get("api"),
				(User)parameters.get("user"));
	}
	public List<KeyValueexecute() throws IOException {
		List<KeyValueresults = new LinkedList<>();
			log(s"WARN""Permission denied invoking: " + GetSettings.class.getSimpleName() + " " + getJsonParameters());
			throw new IllegalStateException("You do not have permission to lookup settings");
		}
		for(Row r : s.execute("select name, value from setting")) {
			results.add(new KeyValue(r.getString(0), r.getString(1)));
		}
		Collections.sort(results);
		return results;
	}
		return "{" +
				"\"person\":" + ( == null?"null":"\"" + .getPersonUuid() + "\"") +
				"}";
	}
New to GrepCode? Check out our FAQ X