Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a8526f23eaf308e2f724d1c4166f60c05eac23bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*******************************************************************************
 * <copyright>
 *
 * Copyright (c) 2005, 2012 SAP AG.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Stefan Dimov - initial API, implementation and documentation
 *
 * </copyright>
 *
 *******************************************************************************/
package org.eclipse.jpt.jpadiagrameditor.ui.internal.provider;

import java.util.Collection;
import java.util.HashSet;
import java.util.Properties;

import org.eclipse.core.resources.IProject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.IPeService;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.jpa.core.context.java.JavaSpecifiedPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.modelintegration.util.IModelIntegrationUtil;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.relations.HasReferanceRelation;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.relations.HasReferanceRelation.HasReferenceType;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.relations.IRelation;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.relations.IRelation.RelDir;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.relations.IRelation.RelType;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.relations.IsARelation;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.IGraphicsUpdater;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.IJPAEditorUtil;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.IPeServiceUtil;


public interface IJPAEditorFeatureProvider extends IFeatureProvider{

	public Diagram getDiagram();
			
	public HashSet<IsARelation> getAllExistingIsARelations();
		
	public HashSet<HasReferanceRelation> getAllExistingHasReferenceRelations();
		
	public ICompilationUnit getCompilationUnit(JavaPersistentType jpt);
	
	public boolean hasObjectWithName(String name);

	public String getKeyForBusinessObject(Object bo);

	public Object remove(String key);
	
    public Object remove(String key, boolean save);	

	public IRelation getRelationRelatedToAttribute(JavaSpecifiedPersistentAttribute jpa);
	
	public HasReferanceRelation getEmbeddedRelationRelatedToAttribute(JavaSpecifiedPersistentAttribute jpa);
	
	public Object getBusinessObjectForKey(String key);

	public void addJPTForUpdate(String jptName);

    public boolean doesRelationExist(JavaPersistentType owner, 
			JavaPersistentType inverse, 
			String ownerAttributeName,
			String inverseAttributeName,
			RelType relType, 
			RelDir relDir);
    
    public boolean doesEmbeddedRelationExist(JavaPersistentType embeddable, JavaPersistentType embeddingEntity, String embeddedAttributeName, HasReferenceType relType);
    
	public void restoreEntity(JavaPersistentType jpt);
	
	public void addRemoveIgnore(JavaPersistentType jpt, String atName);
	
	public void addAddIgnore(JavaPersistentType jpt, String atName);
	
    public void putKeyToBusinessObject(String key, Object bo);
    
	public int getAttribsNum(Shape sh);    
    
	public int increaseAttribsNum(Shape sh);
	
	public int decreaseAttribsNum(Shape sh);
	
    public void replaceAttribute(JavaSpecifiedPersistentAttribute oldAt, JavaSpecifiedPersistentAttribute newAt);
    	
	public void renewAttributeJoiningStrategyPropertyListener(JavaSpecifiedPersistentAttribute jpa);
	
	public IPeService getPeService();

	public IPeServiceUtil getPeServiceUtil();
	
	public IJPAEditorUtil getJPAEditorUtil();

	public IDeleteFeature getDeleteFeature(IDeleteContext context);
	
	public ICustomFeature getAddAllEntitiesFeature();
	
	public IModelIntegrationUtil getMoinIntegrationUtil();
	
	public IGraphicsUpdater getGraphicsUpdater();

	public void addAttribForUpdate(PersistenceUnit pu, String entAtMappedBy);
	
	public TransactionalEditingDomain getTransactionalEditingDomain();
	
	public Properties loadProperties(IProject project);

	public Collection<JavaPersistentType> getPersistentTypes();
	
	public JavaPersistentType getFirstSuperclassBelongingToTheDiagram(JavaPersistentType subclass);
	
	public void removeAllRedundantIsARelations();
	
	public boolean existRedundantIsARelations();
	
	public void setGrayColor(final JavaPersistentType jpt);
	
	public void setOriginalPersistentTypeColor();

}

Back to the top