org.apache.cayenne.modeler.action.DbEntitySyncAction.class Maven / Gradle / Ivy
???? 7 ? (Sync Dependent ObjEntities with DbEntity
4org/apache/cayenne/modeler/action/DbEntitySyncAction
getActionName ()Ljava/lang/String;
-org/apache/cayenne/modeler/util/CayenneAction =(Ljava/lang/String;Lorg/apache/cayenne/modeler/Application;)V java/awt/event/KeyEvent
java/awt/Toolkit getDefaultToolkit ()Ljava/awt/Toolkit;
getMenuShortcutKeyMaskEx ()I
javax/swing/KeyStroke getKeyStroke (II)Ljavax/swing/KeyStroke; "
icon-sync.png
$ % & syncDbEntity ()V
( ) * getProjectController 0()Lorg/apache/cayenne/modeler/ProjectController;
, - . / 0 ,org/apache/cayenne/modeler/ProjectController getCurrentDbEntity #()Lorg/apache/cayenne/map/DbEntity;
2 3 4 5 6 org/apache/cayenne/map/DbEntity
getDataMap "()Lorg/apache/cayenne/map/DataMap;
8 9 : ; < org/apache/cayenne/map/DataMap getMappedEntities 9(Lorg/apache/cayenne/map/DbEntity;)Ljava/util/Collection; > ? @ A B java/util/Collection isEmpty ()Z D @org/apache/cayenne/modeler/dialog/objentity/EntitySyncController
F G H I J &org/apache/cayenne/modeler/Application getInstance *()Lorg/apache/cayenne/modeler/Application;
F L M N getFrameController 7()Lorg/apache/cayenne/modeler/CayenneModelerController;
C P
Q W(Lorg/apache/cayenne/modeler/util/CayenneController;Lorg/apache/cayenne/map/DbEntity;)V
C S T U createMerger >()Lorg/apache/cayenne/dbsync/merge/context/EntityMergeSupport; W Vorg/apache/cayenne/modeler/action/DbEntitySyncAction$PreserveRelationshipNameGenerator
V Y
&
[ \ ] ^ _ :org/apache/cayenne/dbsync/merge/context/EntityMergeSupport setNameGenerator 9(Lorg/apache/cayenne/dbsync/naming/ObjectNameGenerator;)V a 8org/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit
, c d e
getProject &()Lorg/apache/cayenne/project/Project;
g h i j k "org/apache/cayenne/project/Project getRootNode 6()Lorg/apache/cayenne/configuration/ConfigurationNode; m 6org/apache/cayenne/configuration/DataChannelDescriptor
, o p 6 getCurrentDataMap
` r
s [(Lorg/apache/cayenne/configuration/DataChannelDescriptor;Lorg/apache/cayenne/map/DataMap;)V
u v w filterInheritedEntities (Ljava/util/Collection;)V > y z { iterator ()Ljava/util/Iterator; } ~ ? B java/util/Iterator hasNext } ? ? ? next ()Ljava/lang/Object; ? org/apache/cayenne/map/ObjEntity ? Sorg/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit$EntitySyncUndoableListener
? ? ? ? ? java/util/Objects requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object;
? ?
? _(Lorg/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit;Lorg/apache/cayenne/map/ObjEntity;)V
[ ? ? ? addEntityMergeListener 0(Lorg/apache/cayenne/util/EntityMergeListener;)V
[ ? ? ? getMeaningfulFKs :(Lorg/apache/cayenne/map/ObjEntity;)Ljava/util/Collection;
[ ? ? B isRemovingMeaningfulFKs ? Rorg/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit$MeaningfulFKsUndoableEdit
? ?
? u(Lorg/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit;Lorg/apache/cayenne/map/ObjEntity;Ljava/util/Collection;)V
` ? ? ? addEdit "(Ljavax/swing/undo/UndoableEdit;)Z
[ ? ? ? synchronizeWithDbEntity %(Lorg/apache/cayenne/map/ObjEntity;)Z ? (org/apache/cayenne/map/event/EntityEvent ? %org/apache/cayenne/map/event/MapEvent
? ?
? 5(Ljava/lang/Object;Lorg/apache/cayenne/map/Entity;I)V
, ? ? ? fireObjEntityEvent -(Lorg/apache/cayenne/map/event/EntityEvent;)V
[ ? ? ? removeEntityMergeListener ? ? ? application (Lorg/apache/cayenne/modeler/Application;
F ? ? ? getUndoManager 6()Lorg/apache/cayenne/modeler/undo/CayenneUndoManager;
? ? ? 2org/apache/cayenne/modeler/undo/CayenneUndoManager
? ? ? ? getSuperEntity $()Lorg/apache/cayenne/map/ObjEntity; } ? ? & remove Code LineNumberTable +(Lorg/apache/cayenne/modeler/Application;)V LocalVariableTable this 6Lorg/apache/cayenne/modeler/action/DbEntitySyncAction; getAcceleratorKey ()Ljavax/swing/KeyStroke; getIconName
performAction (Ljava/awt/event/ActionEvent;)V e Ljava/awt/event/ActionEvent; listener ULorg/apache/cayenne/modeler/undo/DbEntitySyncUndoableEdit$EntitySyncUndoableListener;
meaningfulFKs Ljava/util/Collection; entity "Lorg/apache/cayenne/map/ObjEntity; entities merger