View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  /*
17   * Created on 2005/08/13
18   *
19   * TODO To change the template for this generated file go to
20   * Window - Preferences - Java - Code Style - Code Templates
21   */
22  package org.seasar.tuigwaa.model;
23  
24  import java.util.Collection;
25  import java.util.Iterator;
26  import java.util.List;
27  
28  import org.seasar.tuigwaa.model.common.EntityInfo;
29  import org.seasar.tuigwaa.model.core.TgwDomain;
30  import org.seasar.tuigwaa.model.core.TgwEntity;
31  import org.seasar.tuigwaa.system.TgwServiceException;
32  
33  import javassist.CannotCompileException;
34  
35  
36  /***
37   * @author nishioka
38   */
39  public interface ModelService {
40  
41  	//--- load and save
42  	
43  	public void loadDomain(String domain);
44  
45  	public void saveDomain(String domain);
46  	
47  		
48  	//--- domain manipulation
49  	
50  	public TgwDomain getDomain(String domainName);
51  
52  	public void createDomain(String domainName);
53  	
54  	public void deleteDomain(String domainName);
55  	
56  	public void copyDomain(String srcDomainName, String destDomainName);
57  	
58  	//[Start] ---- entity manipulation -----
59  		
60  	public void createEntity(TgwEntity entity) throws ClassNotFoundException,
61  			CannotCompileException;
62  
63  	public void createEntities(String schema, List entityList);
64  		
65  	public void dropEntity(String schema, String entityName) throws Exception;
66  	
67  	public void updateEntity(TgwEntity entity) throws TgwServiceException;
68  
69  	public TgwEntity getEntity(String domainName, String entityName);
70  
71  	public TgwEntity getEntityByDisplayName(String domainName, String displayName);
72  
73  	public Collection alterEntity(TgwEntity entity, boolean isChangedEntityStructure)
74  	throws Exception;
75  
76  	public List readDatabase(String domainName);
77  
78  	public TgwEntity readJavaClass(String domainName, String entityName, Class clazz);
79  		
80  	//[Start] ----- Entity Util ----
81  	
82  	public Iterator getEntityNameInterator(String schema);
83  
84  	public List createEntityInfoList(String schema);
85  
86  	public EntityInfo createEntityInfo(String schema, String entityName);
87  		
88  	public Iterator getEntityIterator(String schema);
89  
90  	public List getEntityList(String schema);
91  		
92  	public List getNewRefList(TgwEntity fromEntity);
93  	
94  	public String nextEntityName(String domainName);
95  }