<commit_before>package com.axelor.db;

import com.axelor.rpc.filter.Filter;

public interface JpaSecurity {
	
	static enum AccessType {
		
		READ	("You are not authorized to read this resource."),
		WRITE	("You are not authorized to update this resource."),
		CREATE	("You are not authorized to create this resource."),
		REMOVE	("You are not authrorized to remove this resource.");

		private String message;
		private AccessType(String message) {
			this.message = message;
		}

		@Override
		public String toString() {
			return this.message;
		}
	}

	public static final AccessType CAN_READ = AccessType.READ;
	public static final AccessType CAN_WRITE = AccessType.WRITE;
	public static final AccessType CAN_CREATE = AccessType.CREATE;
	public static final AccessType CAN_REMOVE = AccessType.REMOVE;

	Filter getFilter(AccessType type, Class<? extends Model> model, Object... ids);

	void check(AccessType type, Class<? extends Model> model);

	void check(AccessType type, Class<? extends Model> model, Long id);
	
	void check(AccessType type, Model entity);
}
<commit_msg>Added few more security interface methods.<commit_after>package com.axelor.db;

import java.util.Set;

import com.axelor.rpc.filter.Filter;

public interface JpaSecurity {
	
	static enum AccessType {
		
		READ	("You are not authorized to read this resource."),
		WRITE	("You are not authorized to update this resource."),
		CREATE	("You are not authorized to create this resource."),
		REMOVE	("You are not authrorized to remove this resource.");

		private String message;
		private AccessType(String message) {
			this.message = message;
		}

		@Override
		public String toString() {
			return this.message;
		}
	}

	public static final AccessType CAN_READ = AccessType.READ;
	public static final AccessType CAN_WRITE = AccessType.WRITE;
	public static final AccessType CAN_CREATE = AccessType.CREATE;
	public static final AccessType CAN_REMOVE = AccessType.REMOVE;

	Filter getFilter(AccessType type, Class<? extends Model> model, Object... ids);

	Set<AccessType> perms(Class<? extends Model> model);
	
	Set<AccessType> perms(Class<? extends Model> model, Long id);

	Set<AccessType> perms(Model entity);

	void check(AccessType type, Class<? extends Model> model);

	void check(AccessType type, Class<? extends Model> model, Long id);
	
	void check(AccessType type, Model entity);
}

{'fraction_non_alphanumeric': 0.09217758985200845, 'fraction_numerical': 0.0, 'mean_word_length': 4.52803738317757, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '824172', 'n_tokens_mistral': 719, 'n_tokens_neox': 656, 'n_words': 250}