Example usage for org.joda.time Months TWELVE

List of usage examples for org.joda.time Months TWELVE

Introduction

In this page you can find the example usage for org.joda.time Months TWELVE.

Prototype

Months TWELVE

To view the source code for org.joda.time Months TWELVE.

Click Source Link

Document

Constant representing twelve months.

Usage

From source file:org.springsource.restbucks.payment.PaymentInitializer.java

License:Apache License

@Autowired
public PaymentInitializer(CreditCardRepository repository) {

    if (repository.count() > 0) {
        return;/* w  w  w .j a v a 2s  .  c  o  m*/
    }

    CreditCardNumber number = new CreditCardNumber("1234123412341234");
    CreditCard creditCard = new CreditCard(number, "Oliver Gierke", Months.TWELVE, Years.years(2014));

    creditCard = repository.save(creditCard);

    log.info("Credit card {} created!", creditCard);
}