svnno****@sourc*****
svnno****@sourc*****
2008年 12月 19日 (金) 19:22:04 JST
Revision: 2287 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2287 Author: daisuke_m Date: 2008-12-19 19:22:04 +0900 (Fri, 19 Dec 2008) Log Message: ----------- Accessor系インターフェイス廃止。実装クラスにキャストすりゃええやん、ということで。 (インターフェイスだと、一見実装に依存してないように見えるので、ちょっと微妙だと思った。) Modified Paths: -------------- artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/RootModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/AbstractAttributeModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractConnectionModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractRelationModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyMappingImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/AbstractConstraintModel.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/ConstraintsModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/InsertDataSetModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/RecordModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexColumnModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractEntityModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractNodeModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/StickyModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/TableModelImpl.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/ViewModelImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/RootModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/connection/ForeignKeyModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/constraint/ConstraintsModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/InsertDataSetModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/RecordModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/index/IndexModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/node/TableModelChangeSupportImpl.java artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/utils/ObservableList.java Removed Paths: ------------- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/RootModelAccessor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/attribute/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/connection/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/constraint/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/dataset/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/datatype/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/index/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/node/ -------------- next part -------------- Modified: artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF =================================================================== --- artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF 2008-12-19 10:22:04 UTC (rev 2287) @@ -167,12 +167,6 @@ org.easymock.internal.matchers, org.jiemamy, org.jiemamy.internal, - org.jiemamy.internal.accessor, - org.jiemamy.internal.accessor.connection, - org.jiemamy.internal.accessor.constraint, - org.jiemamy.internal.accessor.dataset, - org.jiemamy.internal.accessor.index, - org.jiemamy.internal.accessor.node, org.jiemamy.internal.processor, org.jiemamy.model, org.jiemamy.model.attribute, Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/RootModelAccessor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/RootModelAccessor.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/internal/accessor/RootModelAccessor.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -1,134 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/10/25 - * - * This file is part of Jiemamy. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.jiemamy.internal.accessor; - -import java.util.Collection; -import java.util.List; - -import org.jiemamy.model.RootModel; -import org.jiemamy.model.dataset.InsertDataSetModel; -import org.jiemamy.model.datatype.DomainModel; -import org.jiemamy.model.node.AbstractNodeModel; - -/** - * {@link RootModel}の全フィールドにアクセスするための内部インターフェイス。 - * @author daisuke - */ -public interface RootModelAccessor { - - /** - * 開始スクリプトを取得する。 - * @return 開始スクリプト - */ - String getBeginScript(); - - /** - * 説明文を取得する。 - * @return 説明文 - */ - String getDescription(); - - /** - * SQL方言IDを取得する。 - * @return SQL方言ID - */ - String getDialectId(); - - /** - * 終了スクリプトを取得する。 - * @return 終了スクリプト - */ - String getEndScript(); - - /** - * ドメインのリストを取得する。 - * @return ドメインのリスト - */ - List<DomainModel> getModifiableDomains(); - - /** - * INSERTデータセットを取得する。 - * @return INSERTデータセット - */ - List<InsertDataSetModel> getModifiableInsertDataSets(); - - /** - * ノードのリストを取得する。 - * @return ノードのリスト - */ - Collection<AbstractNodeModel> getModifiableNodes(); - - /** - * スキーマ名を取得する。 - * @return スキーマ名 - */ - String getSchemaName(); - - /** - * 開始スクリプトを設定する。 - * @param beginScript 開始スクリプト - */ - void setBeginScript(String beginScript); - - /** - * 説明文を設定する。 - * @param description 説明文 - */ - void setDescription(String description); - - /** - * SQL方言IDを設定する。 - * @param dialectId SQL方言ID - */ - void setDialectId(String dialectId); - - /** - * ドメインのリストを設定する。 - * @param domains ドメインのリスト - * @throws IllegalArgumentException 引数に{@code null}を与えた場合 - */ - void setDomains(List<DomainModel> domains); - - /** - * 終了スクリプトを設定する。 - * @param endScript 終了スクリプト - */ - void setEndScript(String endScript); - - /** - * INSERTデータセットを設定する。 - * @param insertDataSets INSERTデータセット - * @throws IllegalArgumentException 引数に{@code null}を与えた場合 - */ - void setInsertDataSets(List<InsertDataSetModel> insertDataSets); - - /** - * ノードのリストを設定する。 - * @param nodes ノードのリスト - * @throws IllegalArgumentException 引数に{@code null}を与えた場合 - */ - void setNodes(List<AbstractNodeModel> nodes); - - /** - * スキーマ名を設定する。 - * @param schemaName スキーマ名 - */ - void setSchemaName(String schemaName); - -} Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/RootModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/RootModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/RootModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,8 +34,6 @@ import org.jiemamy.exception.TooManyElementsException; import org.jiemamy.exception.UnexpectedConditionError; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.RootModelAccessor; -import org.jiemamy.internal.accessor.node.NodeModelAccessor; import org.jiemamy.internal.processor.GetConnectionsProcessor; import org.jiemamy.internal.processor.GetEntityProcessor; import org.jiemamy.internal.processor.GetNodesProcessor; @@ -44,6 +42,7 @@ import org.jiemamy.model.datatype.DomainModel; import org.jiemamy.model.node.AbstractEntityModel; import org.jiemamy.model.node.AbstractNodeModel; +import org.jiemamy.model.node.AbstractNodeModelImpl; import org.jiemamy.utils.Identifiable; import org.jiemamy.utils.ProcessorUtil; @@ -52,7 +51,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class RootModelImpl implements RootModel, RootModelAccessor { +public class RootModelImpl implements RootModel { /** SQL方言ID */ private String dialectId; @@ -107,8 +106,8 @@ */ public void appendModel(AbstractConnectionModel connection) { Validate.notNull(connection); - ((NodeModelAccessor) connection.getSource()).getModifiableSourceConnections().add(connection); - ((NodeModelAccessor) connection.getTarget()).getModifiableTargetConnections().add(connection); + ((AbstractNodeModelImpl) connection.getSource()).getModifiableSourceConnections().add(connection); + ((AbstractNodeModelImpl) connection.getTarget()).getModifiableTargetConnections().add(connection); } /** @@ -255,7 +254,8 @@ } /** - * {@inheritDoc} + * ドメインのリストを取得する。 + * @return ドメインのリスト */ public List<DomainModel> getModifiableDomains() { assert domains != null; @@ -263,7 +263,8 @@ } /** - * {@inheritDoc} + * INSERTデータセットを取得する。 + * @return INSERTデータセット */ public List<InsertDataSetModel> getModifiableInsertDataSets() { assert insertDataSets != null; @@ -271,7 +272,8 @@ } /** - * {@inheritDoc} + * ノードのリストを取得する。 + * @return ノードのリスト */ public Collection<AbstractNodeModel> getModifiableNodes() { assert nodes != null; @@ -344,8 +346,8 @@ */ public void removeModel(AbstractConnectionModel connection) { Validate.notNull(connection); - ((NodeModelAccessor) connection.getSource()).getModifiableSourceConnections().remove(connection); - ((NodeModelAccessor) connection.getTarget()).getModifiableTargetConnections().remove(connection); + ((AbstractNodeModelImpl) connection.getSource()).getModifiableSourceConnections().remove(connection); + ((AbstractNodeModelImpl) connection.getTarget()).getModifiableTargetConnections().remove(connection); } /** @@ -397,28 +399,43 @@ } /** + * {@inheritDoc} + */ + public void setEndScript(String endScript) { + this.endScript = endScript; + } + + /** + * {@inheritDoc} + */ + public void setSchemaName(String schemaName) { + this.schemaName = schemaName; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); + } + + /** * ドメインのリストを設定する。 * @param domains ドメインのリスト * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setDomains(List<DomainModel> domains) { + void setDomains(List<DomainModel> domains) { Validate.notNull(domains); this.domains = domains; } /** - * {@inheritDoc} - */ - public void setEndScript(String endScript) { - this.endScript = endScript; - } - - /** * INSERTデータセットを設定する。 * @param insertDataSets INSERTデータセット * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setInsertDataSets(List<InsertDataSetModel> insertDataSets) { + void setInsertDataSets(List<InsertDataSetModel> insertDataSets) { Validate.notNull(insertDataSets); this.insertDataSets = insertDataSets; } @@ -428,24 +445,9 @@ * @param nodes ノードのリスト * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setNodes(List<AbstractNodeModel> nodes) { + void setNodes(List<AbstractNodeModel> nodes) { Validate.notNull(nodes); this.nodes = nodes; } - /** - * {@inheritDoc} - */ - public void setSchemaName(String schemaName) { - this.schemaName = schemaName; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); - } - } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/AbstractAttributeModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/AbstractAttributeModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/AbstractAttributeModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -26,13 +26,12 @@ import org.apache.commons.lang.builder.HashCodeBuilder; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.attribute.AttributeModelAccessor; /** * 属性(カラム等)の抽象クラス。 * @author daisuke */ -public abstract class AbstractAttributeModelImpl implements AbstractAttributeModel, AttributeModelAccessor { +public abstract class AbstractAttributeModelImpl implements AbstractAttributeModel { private boolean disabled; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -24,7 +24,6 @@ import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; -import org.jiemamy.internal.accessor.attribute.ColumnModelAccessor; import org.jiemamy.model.constraint.Constraint; import org.jiemamy.model.constraint.ConstraintsModel; import org.jiemamy.model.constraint.ConstraintsModelImpl; @@ -38,7 +37,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class ColumnModelImpl extends AbstractAttributeModelImpl implements ColumnModel, ColumnModelAccessor { +public class ColumnModelImpl extends AbstractAttributeModelImpl implements ColumnModel { /** 物理名 */ private String name; @@ -203,16 +202,6 @@ } /** - * 制約を設定する。 - * @param constraints 制約 - * @throws IllegalArgumentException 引数に{@code null}を与えた場合 - */ - public void setConstraints(ConstraintsModel constraints) { - Validate.notNull(constraints); - this.constraints = constraints; - } - - /** * {@inheritDoc} */ public void setDataTypeDescriptor(DataTypeDescriptor dataTypeDescriptor) { @@ -275,4 +264,14 @@ public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } + + /** + * 制約を設定する。 + * @param constraints 制約 + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + */ + void setConstraints(ConstraintsModel constraints) { + Validate.notNull(constraints); + this.constraints = constraints; + } } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractConnectionModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractConnectionModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractConnectionModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -21,7 +21,6 @@ import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; -import org.jiemamy.internal.accessor.connection.ConnectionModelAccessor; import org.jiemamy.internal.processor.IsCyclicProcessor; import org.jiemamy.model.node.AbstractNodeModel; import org.jiemamy.utils.ProcessorUtil; @@ -31,7 +30,7 @@ * * @author daisuke */ -public abstract class AbstractConnectionModelImpl implements AbstractConnectionModel, ConnectionModelAccessor { +public abstract class AbstractConnectionModelImpl implements AbstractConnectionModel { /** 接続元ノード */ private AbstractNodeModel source; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractRelationModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractRelationModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/AbstractRelationModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -21,7 +21,6 @@ import java.util.List; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.connection.RelationModelAccessor; import org.jiemamy.model.node.AbstractEntityModel; /** @@ -29,8 +28,7 @@ * * @author daisuke */ -public abstract class AbstractRelationModelImpl extends AbstractConnectionModelImpl implements AbstractRelationModel, - RelationModelAccessor { +public abstract class AbstractRelationModelImpl extends AbstractConnectionModelImpl implements AbstractRelationModel { private boolean disabled; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyMappingImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyMappingImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyMappingImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -24,7 +24,6 @@ import org.apache.commons.lang.builder.ToStringStyle; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.connection.ForeignKeyMappingAccessor; import org.jiemamy.internal.processor.SetDefaultColumnsProcessor; import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; @@ -42,7 +41,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class ForeignKeyMappingImpl implements ForeignKeyMapping, ForeignKeyMappingAccessor { +public class ForeignKeyMappingImpl implements ForeignKeyMapping { /** 制約を受けるカラム */ private ColumnModel constraintColumn; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/connection/ForeignKeyModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -26,7 +26,6 @@ import org.apache.commons.lang.builder.HashCodeBuilder; import org.seasar.framework.container.annotation.tiger.Binding; -import org.jiemamy.internal.accessor.connection.ForeignKeyModelAccessor; import org.jiemamy.internal.processor.GetMappingProcessor; import org.jiemamy.internal.processor.ProvideForeignKeyNameProcessor; import org.jiemamy.internal.processor.UpdateMappingsProcessor; @@ -45,7 +44,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class ForeignKeyModelImpl extends AbstractRelationModelImpl implements ForeignKeyModel, ForeignKeyModelAccessor { +public class ForeignKeyModelImpl extends AbstractRelationModelImpl implements ForeignKeyModel { /** 名前 */ private String name; @@ -251,14 +250,6 @@ } /** - * マッピングのリストを設定する。 - * @param mappings マッピングのリスト - */ - public void setMappings(List<ForeignKeyMapping> mappings) { - this.mappings = mappings; - } - - /** * {@inheritDoc} */ public void setMatchType(MatchType matchType) { @@ -293,4 +284,14 @@ ProcessorUtil.process(this, new UpdateMappingsProcessor(rootModel, createColumnWithFk)); } + /** + * マッピングのリストを設定する。 + * @param mappings マッピングのリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + */ + void setMappings(List<ForeignKeyMapping> mappings) { + Validate.notNull(mappings); + this.mappings = mappings; + } + } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/AbstractConstraintModel.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/AbstractConstraintModel.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/AbstractConstraintModel.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -23,14 +23,13 @@ import org.apache.commons.lang.ClassUtils; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.constraint.ConstraintAccessor; /** * 抽象制約モデル。 * * @author daisuke */ -public abstract class AbstractConstraintModel implements Constraint, ConstraintAccessor { +public abstract class AbstractConstraintModel implements Constraint { /** 制約名 */ private String name; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/ConstraintsModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/ConstraintsModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/constraint/ConstraintsModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -28,7 +28,6 @@ import org.seasar.framework.util.tiger.CollectionsUtil; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.constraint.ConstraintsModelAccessor; /** * 制約の集合モデル。 @@ -36,7 +35,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class ConstraintsModelImpl implements ConstraintsModel, ConstraintsModelAccessor { +public class ConstraintsModelImpl implements ConstraintsModel { /** 制約のマップ */ private Map<Class<? extends Constraint>, Constraint> constraintMap = CollectionsUtil.newHashMap(); @@ -108,7 +107,8 @@ } /** - * {@inheritDoc} + * 制約のマップを取得する。 + * @return 制約のマップ */ public Map<Class<? extends Constraint>, Constraint> getConstraintMap() { assert constraintMap != null; @@ -193,14 +193,6 @@ /** * {@inheritDoc} */ - public void setConstraintMap(Map<Class<? extends Constraint>, Constraint> constraintMap) { - Validate.notNull(constraintMap); - this.constraintMap = constraintMap; - } - - /** - * {@inheritDoc} - */ public int size() { assert constraintMap != null; return constraintMap.size(); @@ -248,4 +240,14 @@ assert constraintMap != null; return constraintMap.values().toString(); } + + /** + * 制約のマップを設定する。 + * @param constraintMap 制約のマップ + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + */ + void setConstraintMap(Map<Class<? extends Constraint>, Constraint> constraintMap) { + Validate.notNull(constraintMap); + this.constraintMap = constraintMap; + } } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/InsertDataSetModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/InsertDataSetModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/InsertDataSetModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -26,7 +26,6 @@ import org.seasar.framework.container.annotation.tiger.Binding; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.dataset.InsertDataSetModelAccessor; import org.jiemamy.model.node.AbstractEntityModel; /** @@ -34,7 +33,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class InsertDataSetModelImpl implements InsertDataSetModel, InsertDataSetModelAccessor { +public class InsertDataSetModelImpl implements InsertDataSetModel { /** データセット名 */ private String name; @@ -96,18 +95,18 @@ } /** - * レコード情報を設定する。 - * @param records レコード情報 - */ - public void setRecords(Map<AbstractEntityModel, List<RecordModel>> records) { - this.records = records; - } - - /** * {@inheritDoc} */ @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } + + /** + * レコード情報を設定する。 + * @param records レコード情報 + */ + void setRecords(Map<AbstractEntityModel, List<RecordModel>> records) { + this.records = records; + } } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/RecordModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/RecordModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/dataset/RecordModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -30,7 +30,6 @@ import org.seasar.framework.container.annotation.tiger.Binding; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.dataset.RecordModelAccessor; import org.jiemamy.model.attribute.ColumnModel; /** @@ -38,7 +37,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class RecordModelImpl implements RecordModel, RecordModelAccessor { +public class RecordModelImpl implements RecordModel { /** * カラムに対応するデータ @@ -140,16 +139,18 @@ /** * {@inheritDoc} */ - public void setValues(Map<ColumnModel, String> values) { - Validate.notNull(values); - this.values = values; + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } /** - * {@inheritDoc} + * カラムに対応するデータを設定する。 + * @param values カラムに対応するデータ + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); + void setValues(Map<ColumnModel, String> values) { + Validate.notNull(values); + this.values = values; } } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/DomainModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -26,7 +26,6 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; -import org.jiemamy.internal.accessor.datatype.DomainModelAccessor; import org.jiemamy.model.constraint.Constraint; import org.jiemamy.model.constraint.ConstraintsModel; import org.jiemamy.model.constraint.ConstraintsModelImpl; @@ -37,7 +36,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class DomainModelImpl implements DomainModel, DomainModelAccessor { +public class DomainModelImpl implements DomainModel { /** ドメイン名 */ private String name; @@ -234,14 +233,6 @@ /** * {@inheritDoc} */ - public void setConstraints(ConstraintsModel constraints) { - Validate.notNull(constraints); - this.constraints = constraints; - } - - /** - * {@inheritDoc} - */ public void setDataTypeDescriptor(DataTypeDescriptor dataTypeDescriptor) { this.dataTypeDescriptor = dataTypeDescriptor; } @@ -296,4 +287,14 @@ return name + ":" + ObjectUtils.toString(dataTypeDescriptor, "null"); } + /** + * 制約を設定する。 + * @param constraints 制約 + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + */ + void setConstraints(ConstraintsModel constraints) { + Validate.notNull(constraints); + this.constraints = constraints; + } + } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexColumnModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexColumnModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexColumnModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -21,7 +21,6 @@ import java.util.List; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.index.IndexColumnModelAccessor; import org.jiemamy.model.attribute.ColumnModel; /** @@ -29,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class IndexColumnModelImpl implements IndexColumnModel, IndexColumnModelAccessor { +public class IndexColumnModelImpl implements IndexColumnModel { /** インデックス対象カラム */ private ColumnModel column; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/index/IndexModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -24,7 +24,6 @@ import org.seasar.framework.container.annotation.tiger.Binding; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.index.IndexModelAccessor; /** * インデックスモデル。 @@ -32,7 +31,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class IndexModelImpl implements IndexModel, IndexModelAccessor { +public class IndexModelImpl implements IndexModel { /** インデックス名 */ private String name; @@ -100,14 +99,6 @@ /** * {@inheritDoc} */ - public void setColumns(List<IndexColumnModel> columns) { - Validate.notNull(columns); - this.columns = columns; - } - - /** - * {@inheritDoc} - */ public void setName(String name) { this.name = name; } @@ -118,4 +109,14 @@ public void setUnique(boolean unique) { this.unique = unique; } + + /** + * インデックスカラムのリストを設定する。 + * @param columns インデックスカラムのリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + */ + void setColumns(List<IndexColumnModel> columns) { + Validate.notNull(columns); + this.columns = columns; + } } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractEntityModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractEntityModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractEntityModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -25,7 +25,6 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; -import org.jiemamy.internal.accessor.node.EntityModelAccessor; import org.jiemamy.internal.processor.GetConstrainEntitiesProcessor; import org.jiemamy.internal.processor.GetReferenceEntitiesProcessor; import org.jiemamy.internal.processor.ProvideEntityNameProcessor; @@ -38,8 +37,7 @@ * * @author daisuke */ -public abstract class AbstractEntityModelImpl extends AbstractNodeModelImpl implements AbstractEntityModel, - EntityModelAccessor { +public abstract class AbstractEntityModelImpl extends AbstractNodeModelImpl implements AbstractEntityModel { /** 名前 */ private String name; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractNodeModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractNodeModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/AbstractNodeModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -27,7 +27,6 @@ import org.seasar.framework.container.annotation.tiger.Binding; import org.jiemamy.internal.AdapterManager; -import org.jiemamy.internal.accessor.node.NodeModelAccessor; import org.jiemamy.model.connection.AbstractConnectionModel; import org.jiemamy.utils.Identifiable; @@ -37,7 +36,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public abstract class AbstractNodeModelImpl implements AbstractNodeModel, NodeModelAccessor { +public abstract class AbstractNodeModelImpl implements AbstractNodeModel { /** このモデルを接続元とするコネクションのリスト */ @Binding("list") @@ -81,7 +80,8 @@ } /** - * {@inheritDoc} + * このモデルを接続元とするコネクションのリストを取得する。 + * @return このモデルを接続元とするコネクションのリスト */ public List<AbstractConnectionModel> getModifiableSourceConnections() { assert sourceConnections != null; @@ -89,7 +89,8 @@ } /** - * {@inheritDoc} + * このモデルを接続先とするコネクションのリストを取得する。 + * @return このモデルを接続先とするコネクションのリスト */ public List<AbstractConnectionModel> getModifiableTargetConnections() { assert targetConnections != null; @@ -129,24 +130,28 @@ /** * {@inheritDoc} */ - public void setSourceConnections(List<AbstractConnectionModel> sourceConnections) { + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); + } + + /** + * このモデルを接続元とするコネクションのリストを設定する。 + * @param sourceConnections このモデルを接続元とするコネクションのリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + */ + void setSourceConnections(List<AbstractConnectionModel> sourceConnections) { Validate.notNull(sourceConnections); this.sourceConnections = sourceConnections; } /** - * {@inheritDoc} + * このモデルを接続先とするコネクションのリストを設定する。 + * @param targetConnections このモデルを接続先とするコネクションのリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setTargetConnections(List<AbstractConnectionModel> targetConnections) { + void setTargetConnections(List<AbstractConnectionModel> targetConnections) { Validate.notNull(targetConnections); this.targetConnections = targetConnections; } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); - } } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/StickyModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/StickyModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/StickyModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -18,7 +18,6 @@ */ package org.jiemamy.model.node; -import org.jiemamy.internal.accessor.node.StickyModelAccessor; /** * 付箋モデル。 @@ -26,7 +25,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class StickyModelImpl extends AbstractNodeModelImpl implements StickyModel, StickyModelAccessor { +public class StickyModelImpl extends AbstractNodeModelImpl implements StickyModel { /** 内容文 */ private String contents; Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/TableModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/TableModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/TableModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -26,7 +26,6 @@ import org.seasar.framework.container.annotation.tiger.Binding; import org.jiemamy.exception.TooManyElementsException; -import org.jiemamy.internal.accessor.node.TableModelAccessor; import org.jiemamy.internal.processor.GetColumnProcessor; import org.jiemamy.internal.processor.GetPrimaryKeyColumnsProcessor; import org.jiemamy.model.attribute.ColumnModel; @@ -40,7 +39,7 @@ * @author daisuke */ @SuppressWarnings("serial") -public class TableModelImpl extends AbstractEntityModelImpl implements TableModel, TableModelAccessor { +public class TableModelImpl extends AbstractEntityModelImpl implements TableModel { /** カラムのリスト */ @Binding("list") @@ -125,7 +124,8 @@ } /** - * {@inheritDoc} + * テーブルCHECK制約のリストを取得する。 + * @return テーブルCHECK制約のリスト */ public List<CheckConstraintModel> getModifiableChecks() { assert checks != null; @@ -133,7 +133,8 @@ } /** - * {@inheritDoc} + * カラムのリストを取得する。 + * @return カラムのリスト */ public List<ColumnModel> getModifiableColumns() { assert columns != null; @@ -141,7 +142,8 @@ } /** - * {@inheritDoc} + * インデックスのリストを取得する。 + * @return インデックスのリスト */ public List<IndexModel> getModifiableIndexes() { assert indexes != null; @@ -183,26 +185,32 @@ } /** - * {@inheritDoc} + * テーブルCHECK制約のリストを設定する。 + * @param checks テーブルCHECK制約のリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setChecks(List<CheckConstraintModel> checks) { + void setChecks(List<CheckConstraintModel> checks) { assert checks != null; Validate.notNull(checks); this.checks = checks; } /** - * {@inheritDoc} + * カラムのリストを設定する。 + * @param columns カラムのリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setColumns(List<ColumnModel> columns) { + void setColumns(List<ColumnModel> columns) { Validate.notNull(columns); this.columns = columns; } /** - * {@inheritDoc} + * インデックスのリストを設定する。 + * @param indexes インデックスのリスト + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 */ - public void setIndexes(List<IndexModel> indexes) { + void setIndexes(List<IndexModel> indexes) { Validate.notNull(indexes); this.indexes = indexes; } Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/ViewModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/ViewModelImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/node/ViewModelImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -20,15 +20,13 @@ import java.util.UUID; -import org.jiemamy.internal.accessor.node.ViewModelAccessor; - /** * ビューモデル * * @author daisuke */ @SuppressWarnings("serial") -public class ViewModelImpl extends AbstractEntityModelImpl implements ViewModel, ViewModelAccessor { +public class ViewModelImpl extends AbstractEntityModelImpl implements ViewModel { /** VIEW定義SELECT文 */ private String definition; Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/RootModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/RootModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/RootModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,7 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.internal.accessor.RootModelAccessor; import org.jiemamy.model.RootModel; import org.jiemamy.model.RootModelImpl; import org.jiemamy.model.dataset.InsertDataSetModel; @@ -157,7 +156,7 @@ * @category instance creation */ public RootModelChangeSupportImpl(RootModel source) { - RootModelAccessor accessor = (RootModelAccessor) source; + RootModelImpl accessor = (RootModelImpl) source; eventTarget = new WeakReference<RootModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableList<DomainModel>) accessor.getModifiableDomains()).addListener(domainsCollectionChangeListener); Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/connection/ForeignKeyModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/connection/ForeignKeyModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/connection/ForeignKeyModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,8 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.exception.UnexpectedConditionError; -import org.jiemamy.internal.accessor.connection.ForeignKeyModelAccessor; import org.jiemamy.model.connection.ForeignKeyMapping; import org.jiemamy.model.connection.ForeignKeyModel; import org.jiemamy.model.connection.ForeignKeyModelImpl; @@ -103,11 +101,7 @@ * @category instance creation */ public ForeignKeyModelChangeSupportImpl(ForeignKeyModel source) { - if ((source instanceof ForeignKeyModelAccessor) == false) { - throw new UnexpectedConditionError( - "ForeignKeyModel class does not implement ForeignKeyModelAccessor interface."); - } - ForeignKeyModelAccessor accessor = (ForeignKeyModelAccessor) source; + ForeignKeyModelImpl accessor = (ForeignKeyModelImpl) source; eventTarget = new WeakReference<ForeignKeyModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableList<ForeignKeyMapping>) accessor.getMappings()).addListener(mappingsCollectionChangeListener); Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/constraint/ConstraintsModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/constraint/ConstraintsModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/constraint/ConstraintsModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,7 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.internal.accessor.constraint.ConstraintsModelAccessor; import org.jiemamy.model.constraint.ConstraintsModel; import org.jiemamy.model.constraint.ConstraintsModelImpl; import org.jiemamy.utils.ObservableMap; @@ -101,7 +100,7 @@ * @category instance creation */ public ConstraintsModelChangeSupportImpl(ConstraintsModel source) { - ConstraintsModelAccessor accessor = (ConstraintsModelAccessor) source; + ConstraintsModelImpl accessor = (ConstraintsModelImpl) source; eventTarget = new WeakReference<ConstraintsModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableMap<Class<? extends org.jiemamy.model.constraint.Constraint>, org.jiemamy.model.constraint.Constraint>) accessor Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/InsertDataSetModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/InsertDataSetModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/InsertDataSetModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,7 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.internal.accessor.dataset.InsertDataSetModelAccessor; import org.jiemamy.model.dataset.InsertDataSetModel; import org.jiemamy.model.dataset.InsertDataSetModelImpl; import org.jiemamy.model.node.AbstractEntityModel; @@ -102,7 +101,7 @@ * @category instance creation */ public InsertDataSetModelChangeSupportImpl(InsertDataSetModel source) { - InsertDataSetModelAccessor accessor = (InsertDataSetModelAccessor) source; + InsertDataSetModelImpl accessor = (InsertDataSetModelImpl) source; eventTarget = new WeakReference<InsertDataSetModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableMap<AbstractEntityModel, java.util.List<org.jiemamy.model.dataset.RecordModel>>) accessor Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/RecordModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/RecordModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/dataset/RecordModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,7 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.internal.accessor.dataset.RecordModelAccessor; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.dataset.RecordModel; import org.jiemamy.model.dataset.RecordModelImpl; @@ -101,7 +100,7 @@ * @category instance creation */ public RecordModelChangeSupportImpl(RecordModel source) { - RecordModelAccessor accessor = (RecordModelAccessor) source; + RecordModelImpl accessor = (RecordModelImpl) source; eventTarget = new WeakReference<RecordModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableMap<ColumnModel, String>) accessor.getValues()).addListener(valuesCollectionChangeListener); Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/index/IndexModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/index/IndexModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/index/IndexModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,7 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.internal.accessor.index.IndexModelAccessor; import org.jiemamy.model.index.IndexColumnModel; import org.jiemamy.model.index.IndexModel; import org.jiemamy.model.index.IndexModelImpl; @@ -102,7 +101,7 @@ * @category instance creation */ public IndexModelChangeSupportImpl(IndexModel source) { - IndexModelAccessor accessor = (IndexModelAccessor) source; + IndexModelImpl accessor = (IndexModelImpl) source; eventTarget = new WeakReference<IndexModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableList<IndexColumnModel>) accessor.getColumns()).addListener(columnsCollectionChangeListener); Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/node/TableModelChangeSupportImpl.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/node/TableModelChangeSupportImpl.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/event/helper/node/TableModelChangeSupportImpl.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -34,7 +34,6 @@ import org.jiemamy.event.ObservableCollectionChangeEvent; import org.jiemamy.event.ObservableCollectionChangeListener; import org.jiemamy.event.ObservableCollectionChangeEvent.Timing; -import org.jiemamy.internal.accessor.node.TableModelAccessor; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.constraint.CheckConstraintModel; import org.jiemamy.model.index.IndexModel; @@ -156,7 +155,7 @@ * @category instance creation */ public TableModelChangeSupportImpl(TableModel source) { - TableModelAccessor accessor = (TableModelAccessor) source; + TableModelImpl accessor = (TableModelImpl) source; eventTarget = new WeakReference<TableModel>(source); source.getAdapter(Observable.class).addModelChangeListener(modelChangeListener); ((ObservableList<ColumnModel>) accessor.getModifiableColumns()).addListener(columnsCollectionChangeListener); Modified: artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/utils/ObservableList.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/utils/ObservableList.java 2008-12-19 09:55:32 UTC (rev 2286) +++ artemis/trunk/org.jiemamy.event/src/main/java/org/jiemamy/utils/ObservableList.java 2008-12-19 10:22:04 UTC (rev 2287) @@ -275,15 +275,15 @@ */ @Override public boolean remove(Object o) { - int index = list.indexOf(o); - fireChange(new ObservableCollectionChangeEvent<List<T>, T>( - ObservableCollectionChangeEvent.Timing.BEFORE_REMOVE, this, index, (T) o)); - boolean result = list.remove(o); - @SuppressWarnings("unchecked") // TODO キャスト安全性の根拠提示 T t = (T) o; + int index = list.indexOf(t); + fireChange(new ObservableCollectionChangeEvent<List<T>, T>( + ObservableCollectionChangeEvent.Timing.BEFORE_REMOVE, this, index, t)); + boolean result = list.remove(t); + // 要素に対する監視をやめる。 endObserve(t); fireChange(new ObservableCollectionChangeEvent<List<T>, T>(ObservableCollectionChangeEvent.Timing.AFTER_REMOVE,