Java Code Examples for org.jeecgframework.poi.excel.entity.params.ExcelImportEntity#getMethod()
The following examples show how to use
org.jeecgframework.poi.excel.entity.params.ExcelImportEntity#getMethod() .
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: CellValueServer.java From autopoi with Apache License 2.0 | 6 votes |
/** * 获取cell的值 * * @param object * @param excelParams * @param cell * @param titleString */ public Object getValue(IExcelDataHandler dataHanlder, Object object, Cell cell, Map<String, ExcelImportEntity> excelParams, String titleString) throws Exception { ExcelImportEntity entity = excelParams.get(titleString); String xclass = "class java.lang.Object"; if (!(object instanceof Map)) { Method setMethod = entity.getMethods() != null && entity.getMethods().size() > 0 ? entity.getMethods().get(entity.getMethods().size() - 1) : entity.getMethod(); Type[] ts = setMethod.getGenericParameterTypes(); xclass = ts[0].toString(); } Object result = getCellValue(xclass, cell, entity); if (entity != null) { result = hanlderSuffix(entity.getSuffix(), result); //update-begin-author:taoYan date:20180807 for:多值替换 result = replaceValue(entity.getReplace(), result,entity.isMultiReplace()); //update-end-author:taoYan date:20180807 for:多值替换 } result = hanlderValue(dataHanlder, object, result, titleString); return getValueByType(xclass, result, entity); }
Example 2
Source File: CellValueServer.java From jeasypoi with Apache License 2.0 | 6 votes |
/** * 获取cell的值 * * @param object * @param excelParams * @param cell * @param titleString */ public Object getValue(IExcelDataHandler dataHanlder, Object object, Cell cell, Map<String, ExcelImportEntity> excelParams, String titleString) throws Exception { ExcelImportEntity entity = excelParams.get(titleString); String xclass = "class java.lang.Object"; if (!(object instanceof Map)) { Method setMethod = entity.getMethods() != null && entity.getMethods().size() > 0 ? entity.getMethods().get(entity.getMethods().size() - 1) : entity.getMethod(); Type[] ts = setMethod.getGenericParameterTypes(); xclass = ts[0].toString(); } Object result = getCellValue(xclass, cell, entity); if (entity != null) { result = hanlderSuffix(entity.getSuffix(), result); result = replaceValue(entity.getReplace(), result); } result = hanlderValue(dataHanlder, object, result, titleString); return getValueByType(xclass, result, entity); }
Example 3
Source File: CellValueServer.java From easypoi with Apache License 2.0 | 6 votes |
/** * 获取cell的值 * * @param object * @param excelParams * @param cell * @param titleString */ public Object getValue(IExcelDataHandler dataHanlder, Object object, Cell cell, Map<String, ExcelImportEntity> excelParams, String titleString) throws Exception { ExcelImportEntity entity = excelParams.get(titleString); String xclass = "class java.lang.Object"; if (!(object instanceof Map)) { Method setMethod = entity.getMethods() != null && entity.getMethods().size() > 0 ? entity .getMethods().get(entity.getMethods().size() - 1) : entity.getMethod(); Type[] ts = setMethod.getGenericParameterTypes(); xclass = ts[0].toString(); } Object result = getCellValue(xclass, cell, entity); if (entity != null) { result = hanlderSuffix(entity.getSuffix(), result); result = replaceValue(entity.getReplace(), result); } result = hanlderValue(dataHanlder, object, result, titleString); return getValueByType(xclass, result, entity); }
Example 4
Source File: CellValueServer.java From autopoi with Apache License 2.0 | 5 votes |
/** * 获取cell值 * * @param dataHanlder * @param object * @param entity * @param excelParams * @param titleString * @return */ public Object getValue(IExcelDataHandler dataHanlder, Object object, SaxReadCellEntity cellEntity, Map<String, ExcelImportEntity> excelParams, String titleString) { ExcelImportEntity entity = excelParams.get(titleString); Method setMethod = entity.getMethods() != null && entity.getMethods().size() > 0 ? entity.getMethods().get(entity.getMethods().size() - 1) : entity.getMethod(); Type[] ts = setMethod.getGenericParameterTypes(); String xclass = ts[0].toString(); Object result = cellEntity.getValue(); result = hanlderSuffix(entity.getSuffix(), result); //update-begin-auhtor:taoyan date:20180807 for:多值替换 result = replaceValue(entity.getReplace(), result,entity.isMultiReplace()); //update-end-auhtor:taoyan date:20180807 for:多值替换 result = hanlderValue(dataHanlder, object, result, titleString); return getValueByType(xclass, result, entity); }
Example 5
Source File: CellValueServer.java From jeasypoi with Apache License 2.0 | 5 votes |
/** * 获取cell值 * * @param dataHanlder * @param object * @param entity * @param excelParams * @param titleString * @return */ public Object getValue(IExcelDataHandler dataHanlder, Object object, SaxReadCellEntity cellEntity, Map<String, ExcelImportEntity> excelParams, String titleString) { ExcelImportEntity entity = excelParams.get(titleString); Method setMethod = entity.getMethods() != null && entity.getMethods().size() > 0 ? entity.getMethods().get(entity.getMethods().size() - 1) : entity.getMethod(); Type[] ts = setMethod.getGenericParameterTypes(); String xclass = ts[0].toString(); Object result = cellEntity.getValue(); result = hanlderSuffix(entity.getSuffix(), result); result = replaceValue(entity.getReplace(), result); result = hanlderValue(dataHanlder, object, result, titleString); return getValueByType(xclass, result, entity); }
Example 6
Source File: CellValueServer.java From easypoi with Apache License 2.0 | 5 votes |
/** * 获取cell值 * @param dataHanlder * @param object * @param entity * @param excelParams * @param titleString * @return */ public Object getValue(IExcelDataHandler dataHanlder, Object object, SaxReadCellEntity cellEntity, Map<String, ExcelImportEntity> excelParams, String titleString) { ExcelImportEntity entity = excelParams.get(titleString); Method setMethod = entity.getMethods() != null && entity.getMethods().size() > 0 ? entity .getMethods().get(entity.getMethods().size() - 1) : entity.getMethod(); Type[] ts = setMethod.getGenericParameterTypes(); String xclass = ts[0].toString(); Object result = cellEntity.getValue(); result = hanlderSuffix(entity.getSuffix(), result); result = replaceValue(entity.getReplace(), result); result = hanlderValue(dataHanlder, object, result, titleString); return getValueByType(xclass, result, entity); }