public Formatter clone() { try { return (Formatter) super.clone(); } catch (CloneNotSupportedException e) { throw AWBusinessException.wrapUnhandledException(logger, e); } }
public static Long dbGenerarNumero(Connection conn, String pkModulo) { String sql = "{ call ? := PK_NUMERACION_UTIL.FN_MODULO_NEXT_NUM ( ? ) }"; try { // String sql = "{ call ? := PF_SUMINISTROS_UTIL.FN_OBTENER_NUMERACION( CO_NUMERACION, // usua_modi, nuip_modi, usso_modi, nopc_modi ) }"; // ApplicationUser appUser = SPApplication.getAppUser(); // Connection conn = sessionImplementor.connection(); CallableStatement stmt = conn.prepareCall(sql); stmt.registerOutParameter(1, OracleTypes.VARCHAR); stmt.setObject(2, pkModulo); // stmt.setObject(3, padSize);//padSize // stmt.setObject(4, appUser.getUsername());//"USUMODI" // stmt.setObject(5, appUser.getIpAddress()); //"IPMODI" // stmt.setObject(6, appUser.getOS()); //"SOMODI" // stmt.setObject(7, appUser.getHostName()); //"PCMODI" logger.info(" PK_NUMERACION_UTIL.FN_MODULO_CURR_NUM:" + pkModulo); stmt.execute(); String returnValue = (String) stmt.getObject(1); logger.debug("Numero generado:" + returnValue); stmt.close(); return new Long(returnValue); } catch (SQLException e) { logger.error("SQL:" + sql); throw new AWDeveloperException(AWBusinessException.wrapUnhandledException(logger, e)); } }
public NumberFormatter clone() { try { NumberFormatter numberFormatter = (NumberFormatter) super.clone(); numberFormatter.format = (DecimalFormat) this.format.clone(); return numberFormatter; } catch (CloneNotSupportedException e) { throw AWBusinessException.wrapUnhandledException(logger, e); } }