/** * */ private void initializeTarget() { ContainerManagedEntity cmp = (ContainerManagedEntity) getTarget(); addAttributeMaintenanceAdapter(cmp.getEjbClass()); if (shouldAddToPrimaryKeyClass(cmp)) addAttributeMaintenanceAdapter(cmp.getPrimaryKey()); }
/** * 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