x7.core.bean.DataPermission Maven / Gradle / Ivy
package x7.core.bean;
import x7.core.util.BeanUtil;
import x7.core.util.StringUtil;
import java.util.List;
import java.util.Objects;
/**
* DataPermission, 数据权限, 支持数据库like查找, 或IN; 或搜索,
* Created by Sim on 2016/5/23.
*/
public interface DataPermission {
String LIKE_BASE = "DP0";
String IN_BASE_ZERO = "0";
String IN_BASE_ONE = "1";
String getDataPermissionKey();
void setDataPermissionValue(Object dataPermissionValue);
Object getDataPermissionValue();
class Chain {
public static void beforeHandle(DataPermission dataPermission, Object userDataPermissionValue) {
DataPermission dp = (DataPermission) dataPermission;
Object dataPermissionValue = dp.getDataPermissionValue();
if (Objects.nonNull(dataPermissionValue)) {
if (dataPermissionValue instanceof List) {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy