/** * 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 touch notification. * * @param Notification * msg - Message indicates what has changed. */ protected void jemFlushNotification(Notification msg) { if ((NotificationUtil.isFlushNewEvent(msg) || NotificationUtil.isFlushEvent(msg)) && !isMigrating()) { if (msg.getNotifier() == ((ContainerManagedEntity) getTarget()).getEjbClass()) { touchBeanAdapter(msg); } else if (msg.getNotifier() == ((ContainerManagedEntity) getTarget()).getPrimaryKey()) { touchKeyShapeAdapter(msg); } // if //if the notifier is eq the primary key //else ejb bean class flush } // if } // touchNotification
/** * 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