org.jeecgframework.poi.excel.annotation.ExcelIgnore Java Examples

The following examples show how to use org.jeecgframework.poi.excel.annotation.ExcelIgnore. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExcelPublicUtil.java    From jeewx with Apache License 2.0 6 votes vote down vote up
/**
 * 判断是否不要在这个excel操作中
 * @param field
 * @param targetId
 * @return
 */
public static boolean isNotUserExcelUserThis(Field field, String targetId) {
	boolean boo = true;
	if(field.getAnnotation(ExcelIgnore.class)!=null){
		boo = true;
	}else if(boo&&field.getAnnotation(ExcelCollection.class)!=null
			&&isUseInThis(field.getAnnotation(ExcelCollection.class).exportName(),targetId)){
		boo = false;
	}else if(boo&&field.getAnnotation(Excel.class)!=null
			&&isUseInThis(field.getAnnotation(Excel.class).exportName(),targetId)){
		boo = false;
	}else if(boo&&field.getAnnotation(ExcelEntity.class)!=null
			&&isUseInThis(field.getAnnotation(ExcelEntity.class).exportName(),targetId)){
		boo = false;
	}
	return boo;
}
 
Example #2
Source File: PoiPublicUtil.java    From autopoi with Apache License 2.0 5 votes vote down vote up
/**
 * 判断是否不要在这个excel操作中
 * 
 * @param
 * @param field
 * @param targetId
 * @return
 */
public static boolean isNotUserExcelUserThis(List<String> exclusionsList, Field field, String targetId) {
	boolean boo = true;
	if (field.getAnnotation(ExcelIgnore.class) != null) {
		boo = true;
	} else if (boo && field.getAnnotation(ExcelCollection.class) != null && isUseInThis(field.getAnnotation(ExcelCollection.class).name(), targetId) && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(ExcelCollection.class).name()))) {
		boo = false;
	} else if (boo && field.getAnnotation(Excel.class) != null && isUseInThis(field.getAnnotation(Excel.class).name(), targetId) && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(Excel.class).name()))) {
		boo = false;
	} else if (boo && field.getAnnotation(ExcelEntity.class) != null && isUseInThis(field.getAnnotation(ExcelEntity.class).name(), targetId) && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(ExcelEntity.class).name()))) {
		boo = false;
	}
	return boo;
}
 
Example #3
Source File: PoiPublicUtil.java    From jeasypoi with Apache License 2.0 5 votes vote down vote up
/**
 * 判断是否不要在这个excel操作中
 * 
 * @param
 * @param field
 * @param targetId
 * @return
 */
public static boolean isNotUserExcelUserThis(List<String> exclusionsList, Field field, String targetId) {
	boolean boo = true;
	if (field.getAnnotation(ExcelIgnore.class) != null) {
		boo = true;
	} else if (boo && field.getAnnotation(ExcelCollection.class) != null && isUseInThis(field.getAnnotation(ExcelCollection.class).name(), targetId) && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(ExcelCollection.class).name()))) {
		boo = false;
	} else if (boo && field.getAnnotation(Excel.class) != null && isUseInThis(field.getAnnotation(Excel.class).name(), targetId) && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(Excel.class).name()))) {
		boo = false;
	} else if (boo && field.getAnnotation(ExcelEntity.class) != null && isUseInThis(field.getAnnotation(ExcelEntity.class).name(), targetId) && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(ExcelEntity.class).name()))) {
		boo = false;
	}
	return boo;
}
 
Example #4
Source File: PoiPublicUtil.java    From easypoi with Apache License 2.0 5 votes vote down vote up
/**
 * 判断是否不要在这个excel操作中
 * 
 * @param
 * @param field
 * @param targetId
 * @return
 */
public static boolean isNotUserExcelUserThis(List<String> exclusionsList, Field field,
                                             String targetId) {
    boolean boo = true;
    if (field.getAnnotation(ExcelIgnore.class) != null) {
        boo = true;
    } else if (boo
               && field.getAnnotation(ExcelCollection.class) != null
               && isUseInThis(field.getAnnotation(ExcelCollection.class).name(), targetId)
               && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(
                   ExcelCollection.class).name()))) {
        boo = false;
    } else if (boo
               && field.getAnnotation(Excel.class) != null
               && isUseInThis(field.getAnnotation(Excel.class).name(), targetId)
               && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(
                   Excel.class).name()))) {
        boo = false;
    } else if (boo
               && field.getAnnotation(ExcelEntity.class) != null
               && isUseInThis(field.getAnnotation(ExcelEntity.class).name(), targetId)
               && (exclusionsList == null || !exclusionsList.contains(field.getAnnotation(
                   ExcelEntity.class).name()))) {
        boo = false;
    }
    return boo;
}