Created
March 2, 2011 15:50
-
-
Save dai0304/851137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final class DomainType extends DefaultEntityRef<JmDomain> implements RawTypeDescriptor { | |
private final OnMemoryEntityResolver<? extends JmDomain> res; | |
/** | |
* インスタンスを生成する。 | |
*/ | |
DomainType(SimpleJmDomain x, OnMemoryEntityResolver<? extends SimpleJmDomain> res) { | |
super(x); | |
this.res = res; | |
} | |
public Collection<String> getAliasTypeNames() { | |
return Collections.emptyList(); | |
} | |
public RawTypeCategory getCategory() { | |
JmDomain resolve = res.resolve(this); | |
return resolve.getDataType().getRawTypeDescriptor().getCategory(); | |
} | |
/** | |
* キーに対応するパラメータの値を取得する。 | |
* | |
* @param <T> 値の型 | |
* @param key キー | |
* @return パラメータの値 | |
* @throws IllegalArgumentException 引数に{@code null}を与えた場合 | |
*/ | |
public <T>T getParam(TypeParameterKey<T> key) { | |
JmDomain resolve = res.resolve(this); | |
return resolve.getDataType().getParam(key); | |
} | |
/** | |
* このモデルが持つ全パラメータを取得する。 | |
* | |
* @return カラムが持つ全パラメータ | |
*/ | |
public ParameterMap getParams() { | |
JmDomain resolve = res.resolve(this); | |
return resolve.getDataType().getParams(); | |
} | |
public String getTypeName() { | |
JmDomain resolve = res.resolve(this); | |
return resolve.getDataType().getRawTypeDescriptor().getTypeName(); | |
} | |
/** | |
* 型記述子を取得する。 | |
* | |
* @return 型記述子 | |
*/ | |
public RawTypeDescriptor getTypeReference() { | |
JmDomain resolve = res.resolve(this); | |
return resolve.getDataType().getRawTypeDescriptor(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment