code: public final void zooActivateWrite() {
  		if (DBTracer.TRACE) DBTracer.logCall(this);
  		switch (getStatus()) {
  		case HOLLOW_PERSISTENT_NONTRANSACTIONAL:
  			try {
  				context.getSession().lock();
  				checkActiveForWrite();
  				jdoZooGetNode().refreshObject(this);
  				jdoZooMarkDirty();
  				return;
  			} finally {
  				context.getSession().unlock();
  			}
  		case PERSISTENT_DELETED:
  		case PERSISTENT_NEW_DELETED:
  			throw DBLogger.newUser("The object has been deleted.");
  		case TRANSIENT:
  		case TRANSIENT_CLEAN:
  		case TRANSIENT_DIRTY:
  			//not persistent yet
  			return;
  		case PERSISTENT_DIRTY:
  		case PERSISTENT_NEW:
  		case DETACHED_DIRTY:
  			//nothing to do
  			return;
  		case PERSISTENT_CLEAN:
  			try {
  				context.getSession().lock();
  				checkActiveForWrite();
  				jdoZooMarkDirty();
  				return;
  			} finally {
  				context.getSession().unlock();
  			}
  		case DETACHED_CLEAN:
  			try {
  				context.getSession().lock();
  				jdoZooMarkDirty();
  				return;
  			} finally {
  				context.getSession().unlock();
  			}
  		default:
  		}
  		throw new UnsupportedOperationException(getStatus().toString());
  	}
docs: This method ensures that the specified object is in the cache and then flags it as dirty.
  It includes a call to zooActivateRead().
  
  It should be called in the beginning of every method that writes persistent fields.
  
  For generated calls, we should not forget private method, because they can be called
  from other instances.