* @param access Minimum access
* @return List of commands
*/
@SuppressWarnings("unchecked")
public static List<Command> getCommands(String category, int access) {
Expression expression = ExpressionFactory.likeIgnoreCaseExp(Command.CMDGROUP_PROPERTY, category);
SelectQuery query = new SelectQuery(Command.class, expression);
List<Command> commands = DatabaseContext.getContext().performQuery(query);
List<Command> ret = new ArrayList<Command>(commands.size());
for(Command c : commands)
if(c.getAccess() <= access)