/** * Removes the given facet from this provider and marks it as requiring a delete. * * @param pFacet Facet to delete. */ protected void deleteFacet(T pFacet) { mFacetKeyToFacetMap.remove(pFacet.getFacetKey()); mPersistenceContext.requiresPersisting(pFacet, PersistenceMethod.DELETE); }
/** * Registers a new Facet in the map and marks it as requiring serialisation. * * @param pNewFacet The newly created facet. */ protected void registerNewFacet(T pNewFacet) { mFacetKeyToFacetMap.put(pNewFacet.getFacetKey(), pNewFacet); mPersistenceContext.requiresPersisting(pNewFacet, PersistenceMethod.CREATE); }
/** * Marks the given facet as requiring an update. Note that a new object may be created which * represents an existing facet - this should be considered an update as there should already be a * serialised entity. * * @param pFacet Facet which has been updated. */ protected void updateExistingFacet(T pFacet) { // Put into the map again, in case the caller has actaully created a new object mFacetKeyToFacetMap.put(pFacet.getFacetKey(), pFacet); mPersistenceContext.requiresPersisting(pFacet, PersistenceMethod.UPDATE); }