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 static base.jee.api.cassandra.util.Log.log;
public class JoinGroup extends Command {
	private CassandraAPI api;
	private User user;
	private UUID group;
	private UUID person;
	public JoinGroup(CassandraAPI apiUser userUUID groupUUID personthrows PermissionException {
		if(api == null) {
			throw new IllegalArgumentException("Invalid parameter: api");
		}
		if(group == null) {
			throw new IllegalArgumentException("Invalid parameter: group");
		}
		if(person == null) {
			throw new IllegalArgumentException("Invalid parameter: person");
		}
		if(user == null) {
			throw new PermissionException(this.getClass().getSimpleName(), user"You do not have permission to manage groups.".);
		}
		this. = api;
		this. = group;
		this. = person;
		this. = user;
	}
	public JoinGroup() {
	}
	protected void execute() throws IOException {
		PreparedStatement t = s.prepare("insert into group_member (person_uuid,group_uuid,joined) values(?,?,?)");
		log(s"INFO""Added person " +  + " for to group " + new ResourceUid("Person".toString()), new ResourceUid("Group".toString()));
	}
		return "{" +
				"\"user.person_uuid\":\"" + .getPersonUuid() + "\"," +
				"\"group.uuid\":\"" +  + "\"," +
				"\"person.uuid\":\"" +  + "\"" +
				"}";
	}
New to GrepCode? Check out our FAQ X