// Path: src/org/immopoly/android/constants/Const.java
// public class Const {
// 
// 	public static final String LOG_TAG = "IMPO";
// 
// 	// Intents
// 
// 	// Intent open webview
// 	public static final String EXPOSE_ID = "exposeID";
// 	public static final String EXPOSE_NAME = "exposeName";
// 	public static final String EXPOSE_DESC = "exposeDescription";
// 	public static final String EXPOSE_URL = "exposeURL";
// 	public static final String EXPOSE_IN_PORTOFOLIO = "exposeInPortfolio";
// 	
// //	public static final String EXPOSE_OWNED = "exposeOwned";
// 
// 	// Intent add portofolio
// 	public static final String EXPOSE_ADD_PORTIFOLIO = "addToPortifolio";
// 	public static final String EXPOSE_RELEASE_PORTIFOLIO = "releaseFromPortifolio";
// 
// 	public static final String SOURCE = "source";
// 
// 	// immopoly
// 	public static final String EXPOSE_PICTURE_SMALL = "exposeDescription";
// 
// 	public static final String SHARED_PREF_EXPOSE_WEBVIEW = "exposeWebView";
// 	public static final String KEY_VISITED = "visited";
// 
// 	public static final String AUTH_URL = "oauth_url";
// 	public static final long EXPOSE_THRESHOLD_OLD = 1000L * 60L * 60L * 24L
// 			* 30L;
// 	public static final long EXPOSE_THRESHOLD_NEW = 1000L * 60L * 60L * 24L
// 			* 7L;
// 
// 	public static final String MESSAGE_IMMOPOLY_EXCEPTION = "org.immopoly.common.ImmopolyException";
// 
// 	public static final String IMMOPOLY_EMAIL = "immopolyteam@gmail.com";
// 	public static final int ANALYTICS_INTERVAL = 20;
// 
// 	public static final int USER_SIGNUP = 110;
// 
// 	// IS24 search control - search different radii until at least SEARCH_MIN_RESULTS flats are found  
// 	public static final float[] SEARCH_RADII 	   = { 1, 3, 10 }; // in km
// 	public static final int     SEARCH_MIN_RESULTS = 50;		   // ignored for last search radius
// 	public static final int     SEARCH_MAX_RESULTS = 80;		   // forced result limit. fernglas me, baby!
// }


import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.immopoly.android.constants.Const;
import org.json.JSONException;
import org.json.JSONObject;
		dest.writeString(priceIntervaleType);
		dest.writeDouble(lat);
		dest.writeDouble(lng);
		dest.writeLong(creationDate);
	}

	public static final Parcelable.Creator<Flat> CREATOR = new Parcelable.Creator<Flat>() {
		public Flat createFromParcel(Parcel in) {
			return new Flat(in);
		}

		public Flat[] newArray(int size) {
			return new Flat[size];
		}
	};

	public Flat(Parcel in) {
		uid = in.readInt();
		name = in.readString();
		description = in.readString();
		city = in.readString();
		titlePictureSmall = in.readString();
		priceValue = in.readString();
		currency = in.readString();
		priceIntervaleType = in.readString();
		lat = in.readDouble();
		lng = in.readDouble();
		creationDate=in.readLong();
		long ageMs = System.currentTimeMillis() - creationDate;
		age = ageMs < Const.EXPOSE_THRESHOLD_NEW ? AGE_NEW
// Path: src/org/immopoly/android/constants/Const.java
// public class Const {
// 
// 	public static final String LOG_TAG = "IMPO";
// 
// 	// Intents
// 
// 	// Intent open webview
// 	public static final String EXPOSE_ID = "exposeID";
// 	public static final String EXPOSE_NAME = "exposeName";
// 	public static final String EXPOSE_DESC = "exposeDescription";
// 	public static final String EXPOSE_URL = "exposeURL";
// 	public static final String EXPOSE_IN_PORTOFOLIO = "exposeInPortfolio";
// 	
// //	public static final String EXPOSE_OWNED = "exposeOwned";
// 
// 	// Intent add portofolio
// 	public static final String EXPOSE_ADD_PORTIFOLIO = "addToPortifolio";
// 	public static final String EXPOSE_RELEASE_PORTIFOLIO = "releaseFromPortifolio";
// 
// 	public static final String SOURCE = "source";
// 
// 	// immopoly
// 	public static final String EXPOSE_PICTURE_SMALL = "exposeDescription";
// 
// 	public static final String SHARED_PREF_EXPOSE_WEBVIEW = "exposeWebView";
// 	public static final String KEY_VISITED = "visited";
// 
// 	public static final String AUTH_URL = "oauth_url";
// 	public static final long EXPOSE_THRESHOLD_OLD = 1000L * 60L * 60L * 24L
// 			* 30L;
// 	public static final long EXPOSE_THRESHOLD_NEW = 1000L * 60L * 60L * 24L
// 			* 7L;
// 
// 	public static final String MESSAGE_IMMOPOLY_EXCEPTION = "org.immopoly.common.ImmopolyException";
// 
// 	public static final String IMMOPOLY_EMAIL = "immopolyteam@gmail.com";
// 	public static final int ANALYTICS_INTERVAL = 20;
// 
// 	public static final int USER_SIGNUP = 110;
// 
// 	// IS24 search control - search different radii until at least SEARCH_MIN_RESULTS flats are found  
// 	public static final float[] SEARCH_RADII 	   = { 1, 3, 10 }; // in km
// 	public static final int     SEARCH_MIN_RESULTS = 50;		   // ignored for last search radius
// 	public static final int     SEARCH_MAX_RESULTS = 80;		   // forced result limit. fernglas me, baby!
// }


// Path: src/org/immopoly/android/model/Flat.java
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import org.immopoly.android.constants.Const;
import org.json.JSONException;
import org.json.JSONObject;

		dest.writeString(priceIntervaleType);
		dest.writeDouble(lat);
		dest.writeDouble(lng);
		dest.writeLong(creationDate);
	}

	public static final Parcelable.Creator<Flat> CREATOR = new Parcelable.Creator<Flat>() {
		public Flat createFromParcel(Parcel in) {
			return new Flat(in);
		}

		public Flat[] newArray(int size) {
			return new Flat[size];
		}
	};

	public Flat(Parcel in) {
		uid = in.readInt();
		name = in.readString();
		description = in.readString();
		city = in.readString();
		titlePictureSmall = in.readString();
		priceValue = in.readString();
		currency = in.readString();
		priceIntervaleType = in.readString();
		lat = in.readDouble();
		lng = in.readDouble();
		creationDate=in.readLong();
		long ageMs = System.currentTimeMillis() - creationDate;
		age = ageMs < Const.EXPOSE_THRESHOLD_NEW ? AGE_NEW
				: ageMs < Const.EXPOSE_THRESHOLD_OLD ? AGE_NORMAL