/** * Use if the there was an unset notification. * * @param Notification * msg - Message indicates what has changed. */ protected void unsetNotification(Notification msg) { EStructuralFeature sf = (EStructuralFeature) msg.getFeature(); if ((sf == EJB_PACK.getEnterpriseBean_EjbClass() || sf == EJB_PACK.getEntity_PrimaryKey()) && !isMigrating()) { removeAttributeMaintenanceAdapter((Notifier) msg.getOldValue()); } } // unsetNotification
/** * Use if the there was an set notification. * * @param Notification * msg - Message indicates what has changed. */ protected void setNotification(Notification msg) { EStructuralFeature sf = (EStructuralFeature) msg.getFeature(); if (sf == EJB_PACK.getEnterpriseBean_EjbClass() || sf == EJB_PACK.getEntity_PrimaryKey()) { if (!isMigrating()) { removeAttributeMaintenanceAdapter((Notifier) msg.getOldValue()); addAttributeMaintenanceAdapter((Notifier) msg.getNewValue()); touchKeyShapeAdapter(msg); } } else if (sf == EJB_PACK.getEntity_PrimaryKey()) { removeAttributeMaintenanceAdapter((Notifier) msg.getOldValue()); if (shouldAddToPrimaryKeyClass((ContainerManagedEntity) getTarget())) addAttributeMaintenanceAdapter((Notifier) msg.getNewValue()); } else { jemFlushNotification(msg); //In EMF a TOUCH is a SET. } } // setNotification