Package org.internna.iwebmvc.model

Examples of org.internna.iwebmvc.model.Rating


                    for (Locale l : supportedLocales) o.getIdentifier().add(l, l + ":" + StringUtils.SHA1(String.valueOf(aux)));
              } catch (Exception e) {};
                o.getAmount().setAmount(aux * 1024 * 1024);
                o.getAmount().setCurrency(aux > 0.5 ? usd : eur);
                o.setOrderNumber(num++);
                o.setPriority(new Rating());
                o.getPriority().setRating(Double.valueOf(Math.round(aux * 10) % 5));
                o.setEmitted(emitted);
                calendar.add(Calendar.DATE, (int) Math.round(aux * 10));
                o.setEmissionDate(calendar.getTime());
                try {
View Full Code Here


*/
public class RatingConverter extends AbstractConverter {

    @Override public Object convertInbound(Class<?> paramType, InboundVariable data) throws ConversionException {
      if (!data.isNull()) {
            Rating rating = new Rating();
            try {
                String points = data.getValue();
                rating.setRating(hasText(points) ? Double.parseDouble(points) : 0D);
                return rating;
            } catch (Exception e) {
                throw new ConversionException(paramType, new IWebMvcException("Could not convert Rating from: " + data, e));
            }
      }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.model.Rating

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.