List of usage examples for org.apache.commons.beanutils PropertyUtils getProperty
public static Object getProperty(Object bean, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions.
For more details see PropertyUtilsBean
.
From source file:com.esofthead.mycollab.common.interceptor.aspect.AuditLogAspect.java
@Before("(execution(public * com.esofthead.mycollab..service..*.updateWithSession(..)) || (execution(public * com.esofthead.mycollab..service..*.updateSelectiveWithSession(..)))) && args(bean, username)") public void traceBeforeUpdateActivity(JoinPoint joinPoint, Object bean, String username) { Advised advised = (Advised) joinPoint.getThis(); Class<?> cls = advised.getTargetSource().getTargetClass(); Auditable auditAnnotation = cls.getAnnotation(Auditable.class); if (auditAnnotation != null) { try {//from ww w.ja va 2s . c om int typeid = (Integer) PropertyUtils.getProperty(bean, "id"); int sAccountId = (Integer) PropertyUtils.getProperty(bean, "saccountid"); // store old value to map, wait until the update process // successfully then add to log item // get old value Object service = advised.getTargetSource().getTarget(); Method findMethod; Object oldValue; try { findMethod = cls.getMethod("findById", int.class, int.class); } catch (Exception e) { findMethod = cls.getMethod("findByPrimaryKey", Serializable.class, int.class, int.class); } oldValue = findMethod.invoke(service, typeid, sAccountId); String key = bean.toString() + ClassInfoMap.getType(cls) + typeid; caches.put(key, oldValue); } catch (Exception e) { LOG.error("Error when save audit for save action of service " + cls.getName(), e); } } }
From source file:com.stratio.deep.commons.utils.AnnotationUtils.java
/** * Returns the value of the fields <i>deepField</i> in the instance <i>entity</i> of type T. * * @param entity the entity to process. * @param deepField the Field to process belonging to <i>entity</i> * @return the property value.//w w w . ja va2 s .c o m */ public static Serializable getBeanFieldValue(IDeepType entity, Field deepField) { try { return (Serializable) PropertyUtils.getProperty(entity, deepField.getName()); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e1) { throw new DeepIOException(e1); } }
From source file:com.github.dozermapper.core.DozerBeanMapperTest.java
private void assertImmutable(String name, Mapper mapper) throws Exception { MapperModelContext mapperModelContext = mapper.getMapperModelContext(); Object property = PropertyUtils.getProperty(mapperModelContext, name); assertNotNull(property);/* w ww. j av a 2 s. c o m*/ try { if (property instanceof List) { ((List) property).add(""); } else if (property instanceof Map) { ((Map) property).put("", ""); } fail(); } catch (UnsupportedOperationException e) { } }
From source file:com.bosscs.spark.commons.utils.AnnotationUtils.java
/** * Returns the value of the fields <i>deepField</i> in the instance <i>entity</i> of type T. * * @param entity the entity to process. * @param deepField the Field to process belonging to <i>entity</i> * @return the property value.//from w w w . ja v a 2 s . c o m */ public static Serializable getBeanFieldValue(IType entity, Field deepField) { try { return (Serializable) PropertyUtils.getProperty(entity, deepField.getName()); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e1) { throw new HadoopIOException(e1); } }
From source file:com.googlecode.jtiger.modules.ecside.table.cell.FilterDroplistCell.java
protected Object getFilterOption(Column column, Object bean) throws Exception { return PropertyUtils.getProperty(bean, column.getProperty()); }
From source file:com.pasteur.ci.action.modification.UpdateAction.java
/** * This is the action called from the Struts framework. * * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processing. * @throws java.lang.Exception/*from w w w . j av a 2 s .com*/ * @return */ @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String num_echant = (String) PropertyUtils.getProperty(form, "num_echantillon"); System.out.println("num Echantillon: " + num_echant); Echantillon echantillon = new Echantillon(); echantillon.setNum_echantillon(num_echant); EchantillonDAOImplement echantillonDAOImplement = new EchantillonDAOImplement(DAOFactory.getInstance()); echantillon = (Echantillon) echantillonDAOImplement.find(echantillon); int coliforme_tx = (Integer) PropertyUtils.getProperty(form, "coliforme_tx"); int e_coli = (Integer) PropertyUtils.getProperty(form, "e_coli"); int coliforme_thermo = (Integer) PropertyUtils.getProperty(form, "coliforme_thermo"); int streptocoques_fecaux = (Integer) PropertyUtils.getProperty(form, "streptocoques_fecaux"); int anaerobie_sulfo_red = (Integer) PropertyUtils.getProperty(form, "anaerobie_sulfo_red"); int autre_salm = (Integer) PropertyUtils.getProperty(form, "autre_salm"); int salmonelle = (Integer) PropertyUtils.getProperty(form, "salmonelle"); int vibrio = (Integer) PropertyUtils.getProperty(form, "vibrio"); int serotype_salm = (Integer) PropertyUtils.getProperty(form, "serotype_salm"); int serotype_vibrio = (Integer) PropertyUtils.getProperty(form, "serotype_vibrio"); AutreBacterie autreBacterie = new AutreBacterie(); autreBacterie.setIdautre_bacterie(echantillon.getIdautre_bacterie()); autreBacterie.setColiforme_tx(coliforme_tx); autreBacterie.setE_coli(e_coli); autreBacterie.setAnaerobie_sulfo_red(anaerobie_sulfo_red); autreBacterie.setColiforme_thermo(coliforme_thermo); autreBacterie.setStreptocoques_fecaux(streptocoques_fecaux); autreBacterie.setAutre_salm(autre_salm); autreBacterie.setSalmonelle(salmonelle); autreBacterie.setVibrio(vibrio); autreBacterie.setSerotype_salm(serotype_salm); autreBacterie.setSerotype_vibrio(serotype_vibrio); AutreBacterieDAOImplement autreBacterieDAOImplement = new AutreBacterieDAOImplement( DAOFactory.getInstance()); autreBacterie = (AutreBacterie) autreBacterieDAOImplement.update(autreBacterie); ////////////////////// int cryptosporidium = (Integer) PropertyUtils.getProperty(form, "cryptosporidium"); int giardia = (Integer) PropertyUtils.getProperty(form, "giardia"); int helminthe = (Integer) PropertyUtils.getProperty(form, "helminthe"); Parasite parasite = new Parasite(); parasite.setIdparasite(echantillon.getIdparasite()); parasite.setGiardia(giardia); parasite.setCryptosporidium(cryptosporidium); parasite.setHelminthe(helminthe); ParasiteDAOImplement pdaoic = new ParasiteDAOImplement(DAOFactory.getInstance()); parasite = (Parasite) pdaoic.update(parasite); ////////////////////////////////////// double phosphore = (Double) PropertyUtils.getProperty(form, "phosphore"); double phosphate = (Double) PropertyUtils.getProperty(form, "phosphate"); double azote_totale = (Double) PropertyUtils.getProperty(form, "azote_totale"); double oxygene_dissout = (Double) PropertyUtils.getProperty(form, "oxygene_dissout"); double transparence = (Double) PropertyUtils.getProperty(form, "transparence"); double ph = (Double) PropertyUtils.getProperty(form, "ph"); double temperature = (Double) PropertyUtils.getProperty(form, "temperature"); int ideclairage = (Integer) PropertyUtils.getProperty(form, "ideclairage"); double salinite = (Double) PropertyUtils.getProperty(form, "salinite"); double chlorophyle_a = (Double) PropertyUtils.getProperty(form, "chlorophyle_a"); double nitrate = (Double) PropertyUtils.getProperty(form, "nitrate"); double tubidite = (Double) PropertyUtils.getProperty(form, "tubidite"); double fer = (Double) PropertyUtils.getProperty(form, "fer"); double cadmium = (Double) PropertyUtils.getProperty(form, "cadmium"); double plomb = (Double) PropertyUtils.getProperty(form, "plomb"); double seleniuml = (Double) PropertyUtils.getProperty(form, "seleniuml"); double nickel = (Double) PropertyUtils.getProperty(form, "nickel"); double arsenic = (Double) PropertyUtils.getProperty(form, "arsenic"); double mercure = (Double) PropertyUtils.getProperty(form, "mercure"); double zinc = (Double) PropertyUtils.getProperty(form, "zinc"); double cuivre = (Double) PropertyUtils.getProperty(form, "cuivre"); double conductivite = (Double) PropertyUtils.getProperty(form, "conductivite"); PPhyChim pphychimie = new PPhyChim(); pphychimie.setIdp_phy_chim(echantillon.getIdp_phy_chim()); pphychimie.setArsenic(arsenic); pphychimie.setAzote_totale(azote_totale); pphychimie.setCadmium(cadmium); pphychimie.setChlorophyle_a(chlorophyle_a); pphychimie.setConductivite(conductivite); pphychimie.setCuivre(cuivre); pphychimie.setFer(fer); pphychimie.setIdeclairage(ideclairage); pphychimie.setMercure(mercure); pphychimie.setNickel(nickel); pphychimie.setNitrate(nitrate); pphychimie.setPlomb(plomb); pphychimie.setSalinite(salinite); pphychimie.setSeleniuml(seleniuml); pphychimie.setTemperature(temperature); pphychimie.setTransparence(transparence); pphychimie.setTubidite(tubidite); pphychimie.setZinc(zinc); pphychimie.setPh(ph); pphychimie.setPhosphate(phosphate); pphychimie.setPhosphore(phosphore); pphychimie.setOxygene_dissout(oxygene_dissout); PPhyChimDAOImplement ppcdaoi = new PPhyChimDAOImplement(DAOFactory.getInstance()); pphychimie = (PPhyChim) ppcdaoi.update(pphychimie); //////////////// int enterovirus = (int) PropertyUtils.getProperty(form, "enterovirus"); Virus virus = new Virus(); virus.setIdvirus(echantillon.getIdvirus()); virus.setEnterovirus(enterovirus); VirusDAOImplement vdaoi = new VirusDAOImplement(DAOFactory.getInstance()); virus = (Virus) vdaoi.update(virus); ///////////////// int idprojet = (Integer) PropertyUtils.getProperty(form, "idprojet"); String date_creat = (String) PropertyUtils.getProperty(form, "date_creat"); echantillon.setIdprojet(idprojet); echantillon.setDate_prelevement(date_creat); EchantillonDAOImplement edaoi = new EchantillonDAOImplement(DAOFactory.getInstance()); edaoi.update(echantillon); ////////// LigneGenreCyano ligneGenreCyano = new LigneGenreCyano(); ligneGenreCyano.setIdcyano(echantillon.getIdcyano()); LigneGenreCyanoDAOImplement ligneGenreCyanoDAOImplement = new LigneGenreCyanoDAOImplement( DAOFactory.getInstance()); ArrayList<Object> ligneGenreCyanos = ligneGenreCyanoDAOImplement.find(ligneGenreCyano); //liste1 String listGenreCya = (String) PropertyUtils.getProperty(form, "listeGenreCyano"); ArrayList<Object> ligne_genre_cyanof = partitionneGenreCyano(listGenreCya); //liste2 for (int i = 0; i < ligne_genre_cyanof.size(); i++) { LigneGenreCyano ligneGenreCyano_ = (LigneGenreCyano) ligneGenreCyanos.get(i); LigneGenreCyano ligneGenreCyano1 = (LigneGenreCyano) ligne_genre_cyanof.get(i); ligneGenreCyano1.setIdligne_genre_cyano(ligneGenreCyano_.getIdligne_genre_cyano()); ligneGenreCyano1.setIdcyano(echantillon.getIdcyano()); ligneGenreCyanoDAOImplement.update(ligneGenreCyano1); } /////////////// LigneGeneCyano ligneGeneCyano = new LigneGeneCyano(); ligneGeneCyano.setIdcyano(echantillon.getIdcyano()); LigneGeneCyanoDAOImplement ligneGeneCyanoDAOImplement = new LigneGeneCyanoDAOImplement( DAOFactory.getInstance()); ArrayList<Object> ligneGeneCyanos = ligneGeneCyanoDAOImplement.find(ligneGeneCyano); //liste1 String listGeneCya = (String) PropertyUtils.getProperty(form, "listeGeneCyano"); ArrayList<Object> ligne_gene_cyanof = partitionneGeneCyano(listGeneCya); LigneGeneCyanoDAOImplement geneCyanoDAOImplement = new LigneGeneCyanoDAOImplement(DAOFactory.getInstance()); for (int i = 0; i < ligne_gene_cyanof.size(); i++) { LigneGeneCyano ligneGeneCyano_ = (LigneGeneCyano) ligneGeneCyanos.get(i); LigneGeneCyano ligneGeneCyano1 = (LigneGeneCyano) ligne_gene_cyanof.get(i); ligneGeneCyano1.setIdligne_gene_cyano(ligneGeneCyano_.getIdligne_gene_cyano()); ligneGeneCyano1.setIdcyano(echantillon.getIdcyano()); geneCyanoDAOImplement.update(ligneGeneCyano1); } /////////////// LigneTypeGeneToxicite ligneTypeGeneToxicite = new LigneTypeGeneToxicite(); ligneTypeGeneToxicite.setIdcyano(echantillon.getIdcyano()); LigneTypeGeneToxiciteDAOImplement typeGeneToxiciteDAOImplement = new LigneTypeGeneToxiciteDAOImplement( DAOFactory.getInstance()); ArrayList<Object> ligneTypeGeneToxicites = typeGeneToxiciteDAOImplement.find(ligneTypeGeneToxicite); String listTypeGeneTox = (String) PropertyUtils.getProperty(form, "listeTypeGeneToxicite"); ArrayList<Object> ligne_type_gene_toxf = partitionneTypeGeneTox(listTypeGeneTox); LigneTypeGeneToxiciteDAOImplement ligneTypeGeneToxiciteDAOImplement = new LigneTypeGeneToxiciteDAOImplement( DAOFactory.getInstance()); for (int i = 0; i < ligne_type_gene_toxf.size(); i++) { LigneTypeGeneToxicite ligneTypeGeneToxicite_ = (LigneTypeGeneToxicite) ligneTypeGeneToxicites.get(i); LigneTypeGeneToxicite ligneTypeGeneToxicite1 = (LigneTypeGeneToxicite) ligne_type_gene_toxf.get(i); ligneTypeGeneToxicite1.setIdlignetype_toxicite(ligneTypeGeneToxicite_.getIdlignetype_toxicite()); ligneTypeGeneToxicite1.setIdcyano(echantillon.getIdcyano()); ligneTypeGeneToxiciteDAOImplement.update(ligneTypeGeneToxicite1); } //////////////////////////////////// LigneTypeToxine ligneTypeToxine = new LigneTypeToxine(); ligneTypeToxine.setIdcyano(echantillon.getIdcyano()); LigneTypeToxineDAOImplement ligneTypeToxineDAOImplement = new LigneTypeToxineDAOImplement( DAOFactory.getInstance()); ArrayList<Object> ligneTypeToxines = ligneTypeToxineDAOImplement.find(ligneTypeToxine); String listTypeTox = (String) PropertyUtils.getProperty(form, "listeTypeToxicite"); ArrayList<Object> ligne_type_toxf = partitionneTypeTox(listTypeTox); for (int i = 0; i < ligne_type_gene_toxf.size(); i++) { LigneTypeToxine ligneTypeToxine_ = (LigneTypeToxine) ligneTypeToxines.get(i); LigneTypeToxine ligneTypeToxine1 = (LigneTypeToxine) ligne_type_toxf.get(i); ligneTypeToxine1.setIdligne_type_toxine(ligneTypeToxine_.getIdligne_type_toxine()); ligneTypeToxine1.setIdcyano(echantillon.getIdcyano()); ligneTypeToxineDAOImplement.update(ligneTypeToxine1); } ///////////////////////////////////// LigneFamille ligneFamille = new LigneFamille(); ligneFamille.setIdautre_algue(echantillon.getIdautre_algue()); LigneFamilleDAOimplement ligneFamilleDAOimplement = new LigneFamilleDAOimplement(DAOFactory.getInstance()); ArrayList<Object> ligneFamilles = ligneFamilleDAOimplement.find(ligneFamille); for (int i = 1; i <= ligneFamilles.size(); i++) { LigneFamille ligneFamille_ = (LigneFamille) ligneFamilles.get(i - 1); String algue_fam_genr = (String) PropertyUtils.getProperty(form, "algue_fam_genre" + i) + ""; System.out.println("algue_fam_genre" + i + ": " + algue_fam_genr); String[] part_alg = algue_fam_genr.split(","); String genreAlg = ""; String familleAlg = ""; try { familleAlg = part_alg[0]; genreAlg = part_alg[1]; } catch (Exception e) { } String[] partGenre = genreAlg.split(";"); //inserer dans ligne Famille LigneFamille ligneFamille1 = new LigneFamille(); ligneFamille1.setIdligne_famille(ligneFamille_.getIdligne_famille()); ligneFamille1.setIdfamille(Integer.parseInt(familleAlg)); ligneFamille1.setIdautre_algue(echantillon.getIdautre_algue()); ligneFamille1 = (LigneFamille) ligneFamilleDAOimplement.update(ligneFamille1); //supprimer les lignes genre ayant ce idlignefamille LigneGenreAlgue ligneGenreAlgueDl = new LigneGenreAlgue(); ligneGenreAlgueDl.setIdligne_famille(ligneFamille1.getIdligne_famille()); LigneGenreAlgueDAOImplement ligneGenreAlgueDAOImplementDl = new LigneGenreAlgueDAOImplement( DAOFactory.getInstance()); ligneGenreAlgueDAOImplementDl.delete(ligneGenreAlgueDl); for (int j = 0; j < partGenre.length - 1; j++) { GenreAlgue genreAlgue = new GenreAlgue(); String desing_alg = partGenre[j].trim(); genreAlgue.setDesign_genre_algue(desing_alg); GenreAlgueDAOImplement genreAlgueDAOImplement = new GenreAlgueDAOImplement( DAOFactory.getInstance()); genreAlgue = (GenreAlgue) genreAlgueDAOImplement.findS(genreAlgue); LigneGenreAlgue ligneGenreAlgue = new LigneGenreAlgue(); ligneGenreAlgue.setIdgenre_algue(genreAlgue.getIdgenre_algue()); ligneGenreAlgue.setIdligne_famille(ligneFamille1.getIdligne_famille()); LigneGenreAlgueDAOImplement ligneGenreAlgueDAOImplement = new LigneGenreAlgueDAOImplement( DAOFactory.getInstance()); ligneGenreAlgueDAOImplement.create(ligneGenreAlgue); } } /////////////////////////////////// return mapping.findForward(SUCCESS); }
From source file:com.ultrapower.eoms.common.plugin.ecside.table.cell.FilterDroplistCell.java
protected Object getFilterOption(Column column, Object bean) throws Exception { return PropertyUtils.getProperty(bean, column.getProperty()); }
From source file:com.timesoft.kaitoo.ws.hibernate.AbstractPojo.java
public String toValueString() { PropertyDescriptor[] pd = PropertyUtils.getPropertyDescriptors(this); StringBuffer buffer = new StringBuffer(); SimpleDateFormat simple = new SimpleDateFormat("dd-MM-yyyy", Locale.ENGLISH); if (((List) callStack.get()).contains(this)) { buffer.append("Cyclic Reference!!!"); } else {//from www . ja va2s.c o m ((List) callStack.get()).add(this); for (int index = 0; index < pd.length; ++index) { if ((null != PropertyUtils.getReadMethod(pd[index])) && (pd[index].getPropertyType() != Class.class)) { if (buffer.length() > 0) { buffer.append(", "); } String prop_name = pd[index].getName(); try { if (null == PropertyUtils.getProperty(this, prop_name)) { buffer.append("\" \""); } else { if (pd[index].getPropertyType() == Calendar.class) { buffer.append("\"" + simple.format( ((Calendar) PropertyUtils.getProperty(this, prop_name)).getTime()) + "\""); } else if (pd[index].getPropertyType() == Date.class) { buffer.append( "\"" + simple.format(PropertyUtils.getProperty(this, prop_name) + "\"")); } else { buffer.append("\"" + PropertyUtils.getProperty(this, prop_name) + "\""); } } } catch (Exception e) { buffer.append(e.getMessage()); } } } ((List) callStack.get()).remove(this); } buffer.append(" \n"); return buffer.toString(); }
From source file:com.infinities.skyport.timeout.ServiceProviderTimeLimiter.java
public <T> T newProxy(final T target, Class<T> interfaceType, final Object configuration) throws InitializationException { if (target == null) { return target; }//from w w w. j a v a 2 s . c o m checkNotNull(interfaceType); checkNotNull(configuration); checkArgument(interfaceType.isInterface(), "interfaceType must be an interface type"); checkMethodOwnFunctionConfiguration(interfaceType, configuration); final Set<Method> interruptibleMethods = findInterruptibleMethods(interfaceType); InvocationHandler handler = new InvocationHandler() { @Override public Object invoke(Object obj, final Method method, final Object[] args) throws Throwable { String methodName = method.getName(); long timeoutDuration = 0; TimeUnit timeUnit = TimeUnit.SECONDS; try { FunctionConfiguration functionConfiguration = (FunctionConfiguration) PropertyUtils .getProperty(configuration, methodName); Time timeout = functionConfiguration.getTimeout(); if (timeout != null) { timeoutDuration = timeout.getNumber(); timeUnit = timeout.getUnit(); } } catch (NoSuchMethodException | IllegalArgumentException e) { if (IGNORED_SET.contains(method.getName()) || method.getAnnotation(Deprecated.class) != null) { return method.invoke(target, args); } throwCause(e, false); throw new AssertionError("can't get here"); } catch (InvocationTargetException e) { throwCause(e, false); throw new AssertionError("can't get here"); } Callable<Object> callable = new Callable<Object>() { @Override public Object call() throws Exception { try { return method.invoke(target, args); } catch (InvocationTargetException e) { throwCause(e, false); throw new AssertionError("can't get here"); } } }; if (timeoutDuration > 0) { return limiter.callWithTimeout(callable, timeoutDuration, timeUnit, interruptibleMethods.contains(method)); } else { // no timeout return method.invoke(target, args); } } }; return newProxy(interfaceType, handler); }
From source file:com.tikal.tallerWeb.servicio.reporte.cliente.BitacoraReporteCliente.java
@Override public BordeSeccion generar(BordeSeccion borde, ContextoSeccion contexto, ReporteCliente datos) { Sheet sheet = contexto.getSheet();//w w w.j a v a 2s . c o m XSSFWorkbook wb = contexto.getWb(); int initialRow = borde.getUpperRow(); int initialColumn = borde.getLeftColumn(); BordeSeccion r = new BordeSeccion(); r.setLeftColumn(initialColumn); r.setUpperRow(initialRow); Row row = getRow(sheet, initialRow); Cell cell = row.createCell(initialColumn); cell.setCellValue("Bitacora"); XSSFCellStyle cellStyle = wb.createCellStyle(); addHeaderStyle(cellStyle, wb); addBorders(wb, cellStyle, CellStyle.BORDER_MEDIUM); cell.setCellStyle(cellStyle); for (int i = 1; i < 4; i++) { cell = row.createCell(initialColumn + i); cellStyle = wb.createCellStyle(); addBorders(wb, cellStyle, CellStyle.BORDER_MEDIUM); cell.setCellStyle(cellStyle); } //merge de celdas sheet.addMergedRegion(new CellRangeAddress(initialRow, //first row (0-based) initialRow, //last row (0-based) initialColumn, //first column (0-based) initialColumn + 3 //last column (0-based) )); CreationHelper createHelper = wb.getCreationHelper(); for (EventoRC x : datos.getBitacora()) { initialRow = initialRow + 1; row = getRow(sheet, initialRow); for (int i = 0; i < atributos.length; i++) { cell = row.createCell(initialColumn + i); cellStyle = wb.createCellStyle(); try { if (atributos[i].equals("fecha")) { cellStyle.setDataFormat(createHelper.createDataFormat().getFormat("yy/m/d h:mm:ss")); cell.setCellValue((Date) PropertyUtils.getProperty(x, atributos[i])); } else { cell.setCellValue(PropertyUtils.getProperty(x, atributos[i]).toString()); } } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException ex) { cell.setCellValue(""); } addBorders(wb, cellStyle, CellStyle.BORDER_THIN); cell.setCellStyle(cellStyle); } } r.setLowerRow(initialRow); r.setRightColumn(initialColumn + 3); paintBorder(wb, sheet, CellStyle.BORDER_MEDIUM, r); return r; }