svnno****@sourc*****
svnno****@sourc*****
2009年 4月 6日 (月) 02:01:26 JST
Revision: 3125 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3125 Author: j5ik2o Date: 2009-04-06 02:01:26 +0900 (Mon, 06 Apr 2009) Log Message: ----------- クラスを追加しました。 Added Paths: ----------- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/JoinColumnMeta.java -------------- next part -------------- Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/JoinColumnMeta.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/JoinColumnMeta.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/JoinColumnMeta.java 2009-04-05 17:01:26 UTC (rev 3125) @@ -0,0 +1,93 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 5, 2009 + * + * 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.composer.importer.meta; + +import org.apache.commons.lang.StringUtils; + +/** + * 関連のカラムを指定するためのメタデータ。 + * + * @author j5ik2o + */ +public class JoinColumnMeta { + + /** 外部キーのカラム名 */ + private String name; + + /** 関連テーブルの主キーのカラム名 */ + private String referencedColumnName; + + + /** + * {@link JoinColumnMeta}を作成する。 + */ + public JoinColumnMeta() { + } + + /** + * {@link JoinColumnMeta}を作成する。 + * + * @param name 外部キーのカラム名 + * @param referencedColumnName 関連テーブルの主キーのカラム名 + */ + public JoinColumnMeta(String name, String referencedColumnName) { + if (StringUtils.isBlank(name) == false) { + this.name = name; + } + if (StringUtils.isBlank(referencedColumnName) == false) { + this.referencedColumnName = referencedColumnName; + } + } + + /** + * 外部キーのカラム名を取得する。 + * + * @return 外部キーのカラム名 + */ + public String getName() { + return name; + } + + /** + * 関連テーブルの主キーのカラム名を取得する。 + * + * @return 関連テーブルの主キーのカラム名 + */ + public String getReferencedColumnName() { + return referencedColumnName; + } + + /** + * 外部キーのカラム名を設定する。 + * + * @param name 外部キーのカラム名 + */ + public void setName(String name) { + this.name = name; + } + + /** + * 関連テーブルの主キーのカラム名を設定する。 + * + * @param referencedColumnName 関連テーブルの主キーのカラム名 + */ + public void setReferencedColumnName(String referencedColumnName) { + this.referencedColumnName = referencedColumnName; + } +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/JoinColumnMeta.java ___________________________________________________________________ Added: svn:mime-type + text/plain