}
public void setGallery(Gallery gallery) {
if(objectContext != null) {
objectContext.prepareForAccess(this, "gallery", true);
} else if (this.gallery == null) {
this.gallery = new PersistentObjectHolder(this, "gallery");
}
// note how we notify ObjectContext of change BEFORE the object is actually
// changed... this is needed to take a valid current snapshot
Object oldValue = this.gallery.getValueDirectly();