public static ProfilePersistence convert(Profile p){
if(p==null){
return null;
}
ProfilePersistence pp=new ProfilePersistence();
if(p.getHadoopConf()!=null){
JSONObject o=new JSONObject();
for(String key:p.getHadoopConf().keySet()){
o.put(key, p.getHadoopConf().get(key));
}
pp.setHadoopConf(o.toString());
}
pp.setId(p.getId()==null?null:Long.valueOf(p.getId()));
pp.setUid(p.getUid());
pp.setGmtCreate(p.getGmtCreate());
pp.setGmtModified(p.getGmtModified());
return pp;
}