Back to project page android.
The source code is released under:
Copyright (c) 2013 ApiBootstraper Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Sof...
If you think the Android project android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * /*from w ww . j a v a 2s . c o m*/ */ package com.apibootstraper.mobile.http; import com.apibootstraper.core.Entity; /** * @author Nicolas * */ public class EntityManager { /** * * @param entity */ static public void persist(Entity entity) { if (entity.getUUID() == null) { // Call HTTP POST for entity } else { // Call HTTP PUT for entity } // Update the locale entity after receive response // It's important to set the UUID } static public void persist(Entity entity, HTTPResponse<?> response) { persist(entity); } static public void remove(Entity entity) { // Call HTTP DELETE for entity } }