Created
September 23, 2010 16:49
-
-
Save alonso-contreras/593960 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ****************** | |
// *** Promociones *** | |
// | |
Integer promo1 = new Integer(1); | |
Integer promo2 = new Integer(2); | |
List promoIntList = new ArrayList(); | |
promoIntList.add(promo1); | |
promoIntList.add(promo2); | |
Promocion p1 = new Promocion(); | |
p1.setDescripcion("25% DE DESCUENTO"); | |
p1.setIdPromocion(new Integer(1)); | |
p1.setTipo(Tipo.MENSUALIDADES); | |
Promocion p2 = new Promocion(); | |
p2.setDescripcion("30% DE DESCUENTO"); | |
p2.setIdPromocion(new Integer(2)); | |
p2.setTipo(Tipo.MENSUALIDADES); | |
Map promocionesMap1 = new HashMap(); | |
promocionesMap1.put(promo1, p1); | |
promocionesMap1.put(promo2, p2); | |
Map promocionesMap2 = new HashMap(); | |
promocionesMap2.put(promo2, p2); | |
Integer a3ID = new Integer(3); | |
Articulo a3 = new Articulo(a3ID, "Samsung", "Cámara Digital 10.2 MP Plata", | |
"/img/item02.jpg", Articulo.Tipo.TIENDA, new BigDecimal(1999.0), | |
new BigDecimal(2500.0), new BigDecimal(1999.0 * 2), | |
new BigDecimal(2500.0 * 2), new Integer(2), new Date()); | |
a3.setPromociones(promoIntList); | |
a3.setPromocionesDisponibles(promocionesMap1); | |
// Articulo 4 | |
Integer a4ID = new Integer(4); | |
Articulo a4 = new Articulo(a4ID, "Leonardo", "Portavela con Base", | |
"/img/item01.jpg", Articulo.Tipo.TIENDA, new BigDecimal(569.00), | |
new BigDecimal(569.00 * 3), new Integer(3), new Date()); | |
a4.setPromociones(promoIntList); | |
a4.setPromocionesDisponibles(promocionesMap2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment