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/10
18   */
19  package org.seasar.tuigwaa.model.core;
20  
21  import java.util.Collection;
22  import java.util.Iterator;
23  import java.util.List;
24  
25  import org.seasar.tuigwaa.model.core.impl.FkAttribute;
26  
27  
28  /***
29   * Tuigwaaのモデル(テーブル)を表す
30   * 
31   * @author nishioka
32   */
33  public interface TgwEntity extends TgwElement {
34  
35  	// [Start] ------ Setter Getter -----
36  
37  	public void setImportedClassName(String javaClassName);
38  
39  	public String getImportedClassName();
40  
41  	public void setJavaClassName(String javaClassName);
42  
43  	public String getJavaClassName();
44  
45  	public void setJavaClass(Class clazz);
46  
47  	public Class getJavaClass();
48  
49  	public String getDomainName();
50  
51  	public void setDomainName(String domainName);
52  
53  	public void setAggregation(boolean flag);
54  
55  	public boolean isAggregation();
56  
57  	public boolean isHidden();
58  
59  	public void setHidden(boolean hidden);
60  
61  	public boolean isImportedEntity();
62  
63  	public void setImportedEntity(boolean importedEntity);
64  
65  	public boolean isRandomId();
66  
67  	public void setRandomId(boolean randomId);
68  
69  	// [End] ------ Setter Getter -----
70  
71  	public String getRepresentativeField();
72  
73  	// public String getRecursiveRepresentativeField();
74  
75  	public void setRepresentativeField(String field);
76  
77  	// [Start] attribute
78  
79  	public void addField(TgwAttribute field);
80  
81  	public TgwAttribute removeAttribute(String attrName);
82  
83  	public TgwAttribute getField(String fieldNam);
84  
85  	public TgwAttribute getAttributeByDisplayName(String displayName);
86  	
87  	public void resetAttributes();
88  
89  	// [Start] ------ attribute util ------
90  
91  	public TgwAttribute getFirstField();
92  
93  	public TgwAttribute getFirstNotFkField();
94  
95  	public String getFirstNotFkFieldName();
96  
97  	public Iterator getFieldIterator();
98  
99  	public List getFirstDepthAllFieldList();
100 
101 	public List getAllFieldList();
102 
103 	public List getAllFieldList(List parentList);
104 
105 	public List getAllFieldList(List parentList, int depth);
106 
107 	public Collection getFieldList();
108 
109 	public Object newInstance();
110 	
111 	public void addRemovedAttrName(String attrName);
112 
113 	public List getRemovedAttrNames();
114 	
115 	// [Start] ------ refererenced list -----
116 
117 	public void removeReferencedFkField(FkAttribute fkField);
118 
119 	public void addReferencedFkField(FkAttribute fkField);
120 
121 	public List getReferencedFkFieldList();
122 
123 	public String getPrimaryKeyColumnName();
124 
125 	public void setPrimaryKeyColumnName(String primaryKeyColumnName);
126 	
127 	/***
128 	 * 主キーの表示名を取得する
129 	 */
130 	public String getPrimaryKeyDisplayName();
131 	
132 	/***
133 	 * 主キーの表示名を設定する
134 	 */
135 	public void setPrimaryKeyDisplayName(String primaryKeyDisplayName);
136 }