Assert.java 507 Bytes
Newer Older
Administrator's avatar
Administrator committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
package com.govmade.common.utils;

import org.apache.commons.lang.StringUtils;

import com.govmade.common.exception.RRException;

/**
 * 数据校验
 * 
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new RRException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new RRException(message);
        }
    }
}