/*
 * Copyright 2013 OrgSync
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/
package com.orgsync.api.model.accounts;

import java.lang.reflect.Type;
import java.util.List;

import com.google.gson.reflect.TypeToken;
import com.orgsync.api.model.forms.FormResponse;

/**
 * Full information about an account.
 * 
 * @author steffyj
 * 
 */
public class AccountFull extends AccountDetail {

    public static final Type TYPE = new TypeToken<AccountFull>() {
    }.getType();

    private List<FormResponse> profileResponses;

    public final List<FormResponse> getProfileResponses() {
        return profileResponses;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = super.hashCode();
        result = prime * result + ((profileResponses == null) ? 0 : profileResponses.hashCode());
        return result;
    }

    @Override
    public boolean equals(final Object obj) {
        if (this == obj)
            return true;
        if (!super.equals(obj))
            return false;
        if (getClass() != obj.getClass())
            return false;
        AccountFull other = (AccountFull) obj;
        if (profileResponses == null) {
            if (other.profileResponses != null)
                return false;
        } else if (!profileResponses.equals(other.profileResponses))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "AccountFull [profileResponses=" + profileResponses + "]";
    }

}

@@ -1029,16 +1029,45 @@
 onses;%0A%0A
+    private String aboutMe;%0A%0A
     publ
@@ -1166,212 +1166,42 @@
     
-@Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = super.hashCode();%0A        result = prime * result + ((profileResponses == null) ? 0 : profileResponses.hashCode());
+public final String getAboutMe() %7B
 %0A   
@@ -1216,14 +1216,15 @@
 urn 
-result
+aboutMe
 ;%0A  
@@ -1272,22 +1272,16 @@
 als(
-final 
 Object o
 bj) 
@@ -1276,18 +1276,16 @@
 Object o
-bj
 ) %7B%0A    
@@ -1305,23 +1305,9 @@
 == o
-bj)%0A           
+)
  ret
@@ -1333,38 +1333,35 @@
 f (!
-super.equals(obj))%0A           
+(o instanceof AccountFull))
  ret
@@ -1387,49 +1387,25 @@
 if (
-getClass() != obj.getClas
+!super.equal
 s(
+o
 ))
-%0A           
  ret
@@ -1407,32 +1407,33 @@
 ) return false;%0A
+%0A
         AccountF
@@ -1436,21 +1436,20 @@
 untFull 
-o
 th
-er
+at
  = (Acco
@@ -1462,11 +1462,10 @@
 l) o
-bj
 ;
+%0A
 %0A   
@@ -1477,57 +1477,187 @@
 if (
-profileResponses == null) %7B%0A            if (other
+aboutMe != null ? !aboutMe.equals(that.aboutMe) : that.aboutMe != null) return false;%0A        if (profileResponses != null ? !profileResponses.equals(that.profileResponses) : that
 .pro
@@ -1683,36 +1683,32 @@
 ll)%0A            
-   
- 
 return false;%0A  
@@ -1705,24 +1705,25 @@
  false;%0A
+%0A
         
 %7D else i
@@ -1718,20 +1718,141 @@
     
-%7D else if (!
+return true;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = super.hashCode();%0A        result = 31 * result + (
 prof
@@ -1867,22 +1867,19 @@
 nses
-.equals(other.
+ != null ? 
 prof
@@ -1894,35 +1894,99 @@
 nses
-))%0A            return false
+.hashCode() : 0);%0A        result = 31 * result + (aboutMe != null ? aboutMe.hashCode() : 0)
 ;%0A  
@@ -1990,36 +1990,38 @@
 %0A        return 
-true
+result
 ;%0A    %7D%0A%0A    @Ov
@@ -2070,29 +2070,87 @@
     
-return %22AccountFull %5B
+final StringBuilder sb = new StringBuilder(%22AccountFull%7B%22);%0A        sb.append(%22
 prof
@@ -2163,19 +2163,25 @@
 ponses=%22
- + 
+).append(
 profileR
@@ -2192,21 +2192,188 @@
 nses
- + %22%5D%22;%0A    %7D%0A
+);%0A        sb.append(%22, aboutMe='%22).append(aboutMe).append('%5C'');%0A        sb.append(%22, super=%22).append(super.toString());%0A        sb.append('%7D');%0A        return sb.toString();%0A    %7D
 %0A%7D%0A

Add `about_me` to `AccountFull`.