killbill-memoizeit

account: reformat AccountBinder and AccountBinder No functional

6/14/2012 3:32:06 PM

Details

diff --git a/account/src/main/java/com/ning/billing/account/dao/AccountBinder.java b/account/src/main/java/com/ning/billing/account/dao/AccountBinder.java
index 67c707a..79b265d 100644
--- a/account/src/main/java/com/ning/billing/account/dao/AccountBinder.java
+++ b/account/src/main/java/com/ning/billing/account/dao/AccountBinder.java
@@ -36,20 +36,20 @@ import java.lang.annotation.Target;
 public @interface AccountBinder {
     public static class AccountBinderFactory implements BinderFactory {
         @Override
-        public Binder<AccountBinder, Account> build(Annotation annotation) {
+        public Binder<AccountBinder, Account> build(final Annotation annotation) {
             return new Binder<AccountBinder, Account>() {
                 @Override
-                public void bind(@SuppressWarnings("rawtypes") SQLStatement q, AccountBinder bind, Account account) {
+                public void bind(@SuppressWarnings("rawtypes") final SQLStatement q, final AccountBinder bind, final Account account) {
                     q.bind("id", account.getId().toString());
                     q.bind("externalKey", account.getExternalKey());
                     q.bind("email", account.getEmail());
                     q.bind("name", account.getName());
                     q.bind("firstNameLength", account.getFirstNameLength());
-                    Currency currency = account.getCurrency();
+                    final Currency currency = account.getCurrency();
                     q.bind("currency", (currency == null) ? null : currency.toString());
                     q.bind("billingCycleDay", account.getBillCycleDay());
                     q.bind("paymentMethodId", account.getPaymentMethodId() != null ? account.getPaymentMethodId().toString() : null);
-                    DateTimeZone timeZone = account.getTimeZone();
+                    final DateTimeZone timeZone = account.getTimeZone();
                     q.bind("timeZone", (timeZone == null) ? null : timeZone.toString());
                     q.bind("locale", account.getLocale());
                     q.bind("address1", account.getAddress1());
diff --git a/account/src/main/java/com/ning/billing/account/dao/AccountMapper.java b/account/src/main/java/com/ning/billing/account/dao/AccountMapper.java
index 86c29a6..9fd3943 100644
--- a/account/src/main/java/com/ning/billing/account/dao/AccountMapper.java
+++ b/account/src/main/java/com/ning/billing/account/dao/AccountMapper.java
@@ -30,39 +30,39 @@ import java.util.UUID;
 
 public class AccountMapper extends MapperBase implements ResultSetMapper<Account> {
     @Override
-    public Account map(int index, ResultSet result, StatementContext context) throws SQLException {
-        UUID id = UUID.fromString(result.getString("id"));
-        String externalKey = result.getString("external_key");
-        String email = result.getString("email");
-        String name = result.getString("name");
-        int firstNameLength = result.getInt("first_name_length");
-        int billingCycleDay = result.getInt("billing_cycle_day");
+    public Account map(final int index, final ResultSet result, final StatementContext context) throws SQLException {
+        final UUID id = UUID.fromString(result.getString("id"));
+        final String externalKey = result.getString("external_key");
+        final String email = result.getString("email");
+        final String name = result.getString("name");
+        final int firstNameLength = result.getInt("first_name_length");
+        final int billingCycleDay = result.getInt("billing_cycle_day");
 
-        String currencyString = result.getString("currency");
-        Currency currency = (currencyString == null) ? null : Currency.valueOf(currencyString);
+        final String currencyString = result.getString("currency");
+        final Currency currency = (currencyString == null) ? null : Currency.valueOf(currencyString);
 
-        UUID paymentMethodId = result.getString("payment_method_id") != null ? UUID.fromString(result.getString("payment_method_id")) : null;
+        final UUID paymentMethodId = result.getString("payment_method_id") != null ? UUID.fromString(result.getString("payment_method_id")) : null;
 
-        String timeZoneId = result.getString("time_zone");
-        DateTimeZone timeZone = (timeZoneId == null) ? null : DateTimeZone.forID(timeZoneId);
+        final String timeZoneId = result.getString("time_zone");
+        final DateTimeZone timeZone = (timeZoneId == null) ? null : DateTimeZone.forID(timeZoneId);
 
-        String locale = result.getString("locale");
+        final String locale = result.getString("locale");
 
-        String address1 = result.getString("address1");
-        String address2 = result.getString("address2");
-        String companyName = result.getString("company_name");
-        String city = result.getString("city");
-        String stateOrProvince = result.getString("state_or_province");
-        String postalCode = result.getString("postal_code");
-        String country = result.getString("country");
-        String phone = result.getString("phone");
+        final String address1 = result.getString("address1");
+        final String address2 = result.getString("address2");
+        final String companyName = result.getString("company_name");
+        final String city = result.getString("city");
+        final String stateOrProvince = result.getString("state_or_province");
+        final String postalCode = result.getString("postal_code");
+        final String country = result.getString("country");
+        final String phone = result.getString("phone");
 
-        Boolean isMigrated = result.getBoolean("migrated");
-        Boolean isNotifiedForInvoices = result.getBoolean("is_notified_for_invoices");
+        final Boolean isMigrated = result.getBoolean("migrated");
+        final Boolean isNotifiedForInvoices = result.getBoolean("is_notified_for_invoices");
 
         return new DefaultAccount(id, externalKey, email, name,firstNameLength, currency,
                 billingCycleDay, paymentMethodId, timeZone, locale,
                 address1, address2, companyName, city, stateOrProvince, country, postalCode, phone,
                 isMigrated, isNotifiedForInvoices);
     }
-}
\ No newline at end of file
+}