}
private void newPrices(BigDecimal priceValue, GregorianCalendar begin, Typology typology, int timeBooking, GregorianCalendar date){
ArrayList<Price> pricesOld=typology.getPriceListOnDataRange(begin, begin);
if(pricesOld.size()==0){
Price price = new Price ();
price.setPrice(priceValue);
price.setStructure(typology.getStructure());
price.setHotelId(typology.getStructure().getId());
price.setCalendarDate(begin);
price.setTypology_id(typology.getId());
typology.addPrice(price);
typologyManager.add(typology);
}
for(int i=0; i<(timeBooking); i++){
date=CalendarUtils.nexDay(date);
pricesOld=typology.getPriceListOnDataRange(date, date);
if(pricesOld.size()==0){
Price price = new Price ();
price.setPrice(priceValue);
price.setStructure(typology.getStructure());
price.setHotelId(typology.getStructure().getId());
price.setCalendarDate(date);
price.setTypology_id(typology.getId());
typology.addPrice(price);
typologyManager.add(typology);
}
}