public class ForeignInfo extends Object implements RelationInfo
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected boolean |
_additionalFK |
protected boolean |
_bizOneToOne |
protected boolean |
_canBeNullObject |
protected String |
_constraintName |
protected List<String> |
_dynamicParameterList |
protected String |
_fixedCondition |
protected boolean |
_fixedInline |
protected DBMeta |
_foreignDBMeta |
protected Map<ColumnInfo,ColumnInfo> |
_foreignLocalColumnInfoMap |
protected String |
_foreignPropertyName |
protected DBMeta |
_localDBMeta |
protected Map<ColumnInfo,ColumnInfo> |
_localForeignColumnInfoMap |
protected Class<?> |
_objectNativeType |
protected boolean |
_oneToOne |
protected Class<?> |
_propertyAccessType |
protected PropertyGateway |
_propertyGateway |
protected PropertyMethodFinder |
_propertyMethodFinder |
protected Method |
_readMethod |
protected boolean |
_referrerAsOne |
protected int |
_relationNo |
protected String |
_reversePropertyName |
protected Method |
_writeMethod |
| コンストラクタと説明 |
|---|
ForeignInfo(String constraintName,
String foreignPropertyName,
DBMeta localDBMeta,
DBMeta foreignDBMeta,
Map<ColumnInfo,ColumnInfo> localForeignColumnInfoMap,
int relationNo,
Class<?> propertyAccessType,
boolean oneToOne,
boolean bizOneToOne,
boolean referrerAsOne,
boolean additionalFK,
String fixedCondition,
List<String> dynamicParameterList,
boolean fixedInline,
String reversePropertyName,
boolean canBeNullObject,
PropertyMethodFinder propertyMethodFinder) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
assertObjectNotNull(String variableName,
Object value) |
boolean |
canBeNullObject()
Can the relation be null object?
|
boolean |
containsForeignColumn(ColumnInfo foreignColumn) |
boolean |
containsLocalColumn(ColumnInfo localColumn) |
protected boolean |
doContainsForeignColumn(String columnName) |
protected boolean |
doContainsLocalColumn(String columnName) |
boolean |
equals(Object obj) |
ColumnInfo |
findForeignByLocal(String localColumnDbName) |
ColumnInfo |
findLocalByForeign(String foreignColumnDbName) |
protected PropertyGateway |
findPropertyGateway() |
protected Method |
findReadMethod() |
protected Method |
findWriteMethod() |
String |
getConstraintName()
Get the name of the relation constraint.
|
List<String> |
getDynamicParameterList()
Get the read-only list of dynamic parameter name for fixed-condition if it's additional foreign key.
|
String |
getFixedCondition()
Get the fixed-condition if it's additional foreign key.
|
DBMeta |
getForeignDBMeta()
Get the DB meta of the foreign table.
|
Map<ColumnInfo,ColumnInfo> |
getForeignLocalColumnInfoMap()
Get the read-only map, key is a foreign column info, value is a local column info.
|
String |
getForeignPropertyName()
Get the property name of the foreign relation.
|
DBMeta |
getLocalDBMeta()
Get the DB meta of the local table.
|
Map<ColumnInfo,ColumnInfo> |
getLocalForeignColumnInfoMap()
Get the read-only map, key is a local column info, value is a foreign column info.
|
Map<ColumnInfo,ColumnInfo> |
getLocalTargetColumnInfoMap()
Get the read-only map, key is a local column info, value is a target column info.
|
Class<?> |
getObjectNativeType()
Get the native type mapped to object for the column.
|
Class<?> |
getPropertyAccessType()
Get the type of property access for the relation.
|
Method |
getReadMethod()
Get the read method for entity reflection.
|
int |
getRelationNo()
Get the number of a relation.
|
String |
getRelationPropertyName()
Get the property name of the relation.
|
RelationInfo |
getReverseRelation()
Get the relation info of reverse relation.
|
DBMeta |
getTargetDBMeta()
Get the DB meta of the target table.
|
Method |
getWriteMethod()
Get the write method for entity reflection.
|
boolean |
hasFixedCondition()
Does it have fixed-condition for this relation?
|
boolean |
hasFixedConditionDynamicParameter()
Does it have dynamic parameter of fixed-condition?
|
int |
hashCode() |
protected String |
initCap(String name) |
protected Object |
invokeMethod(Method method,
Object target,
Object[] args) |
boolean |
isAdditionalFK()
Does the relation is from additional foreign key?
|
boolean |
isBizOneToOne()
Does the relation is biz-one-to-one?
|
boolean |
isCompoundKey()
Is the relation key compound key?
|
boolean |
isFixedConditionDynamicParameterRequired()
Is the dynamic parameters of fixed condition required?
|
boolean |
isFixedInline()
Does the fixed condition is for in-line view?
|
boolean |
isNotNullFKColumn()
Do the FK columns have not null constraint?
|
boolean |
isOneToOne()
Does the relation is one-to-one?
|
boolean |
isPureFK()
Does the relation is from pure foreign key?
|
boolean |
isReferrer()
Does the relation is referrer?
|
boolean |
isReferrerAsOne()
Does the relation is referrer-as-one?
|
<PROPERTY> PROPERTY |
read(Entity localEntity)
Read the value to the entity by its gateway (means no reflection).
|
String |
toString() |
void |
write(Entity localEntity,
Object foreignEntity)
Write the value to the entity by its gateway (means no reflection).
|
protected final String _constraintName
protected final String _foreignPropertyName
protected final DBMeta _localDBMeta
protected final DBMeta _foreignDBMeta
protected final Map<ColumnInfo,ColumnInfo> _localForeignColumnInfoMap
protected final Map<ColumnInfo,ColumnInfo> _foreignLocalColumnInfoMap
protected final int _relationNo
protected final Class<?> _objectNativeType
protected final Class<?> _propertyAccessType
protected final boolean _oneToOne
protected final boolean _bizOneToOne
protected final boolean _referrerAsOne
protected final boolean _additionalFK
protected final String _fixedCondition
protected final boolean _fixedInline
protected final String _reversePropertyName
protected final boolean _canBeNullObject
protected final PropertyGateway _propertyGateway
protected final PropertyMethodFinder _propertyMethodFinder
protected final Method _readMethod
protected final Method _writeMethod
public ForeignInfo(String constraintName, String foreignPropertyName, DBMeta localDBMeta, DBMeta foreignDBMeta, Map<ColumnInfo,ColumnInfo> localForeignColumnInfoMap, int relationNo, Class<?> propertyAccessType, boolean oneToOne, boolean bizOneToOne, boolean referrerAsOne, boolean additionalFK, String fixedCondition, List<String> dynamicParameterList, boolean fixedInline, String reversePropertyName, boolean canBeNullObject, PropertyMethodFinder propertyMethodFinder)
public boolean containsLocalColumn(ColumnInfo localColumn)
protected boolean doContainsLocalColumn(String columnName)
public boolean containsForeignColumn(ColumnInfo foreignColumn)
protected boolean doContainsForeignColumn(String columnName)
public ColumnInfo findLocalByForeign(String foreignColumnDbName)
public ColumnInfo findForeignByLocal(String localColumnDbName)
public <PROPERTY> PROPERTY read(Entity localEntity)
read インタフェース内 RelationInfoPROPERTY - The type of property, might be optional.localEntity - The local entity of this column to read. (NotNull)public Method getReadMethod()
public void write(Entity localEntity, Object foreignEntity)
write インタフェース内 RelationInfolocalEntity - The local entity of this column to write. (NotNull)foreignEntity - The written instance of foreign entity, might be optional. (NullAllowed: if null, null written)public Method getWriteMethod()
protected PropertyGateway findPropertyGateway()
protected Method findReadMethod()
protected Method findWriteMethod()
public String getRelationPropertyName()
RelationInfogetRelationPropertyName インタフェース内 RelationInfopublic DBMeta getTargetDBMeta()
RelationInfogetTargetDBMeta インタフェース内 RelationInfopublic Map<ColumnInfo,ColumnInfo> getLocalTargetColumnInfoMap()
RelationInfogetLocalTargetColumnInfoMap インタフェース内 RelationInfopublic boolean isReferrer()
RelationInfoisReferrer インタフェース内 RelationInfopublic String getConstraintName()
getConstraintName インタフェース内 RelationInfopublic String getForeignPropertyName()
public DBMeta getLocalDBMeta()
getLocalDBMeta インタフェース内 RelationInfopublic DBMeta getForeignDBMeta()
public Map<ColumnInfo,ColumnInfo> getLocalForeignColumnInfoMap()
public Map<ColumnInfo,ColumnInfo> getForeignLocalColumnInfoMap()
public int getRelationNo()
public Class<?> getObjectNativeType()
getObjectNativeType インタフェース内 RelationInfopublic Class<?> getPropertyAccessType()
getPropertyAccessType インタフェース内 RelationInfopublic boolean isOneToOne()
isOneToOne インタフェース内 RelationInfopublic boolean isBizOneToOne()
public boolean isReferrerAsOne()
public boolean isAdditionalFK()
public String getFixedCondition()
public List<String> getDynamicParameterList()
public boolean isFixedInline()
public RelationInfo getReverseRelation()
getReverseRelation インタフェース内 RelationInfopublic boolean canBeNullObject()
public boolean isCompoundKey()
isCompoundKey インタフェース内 RelationInfopublic boolean isPureFK()
public boolean isNotNullFKColumn()
public boolean hasFixedCondition()
public boolean hasFixedConditionDynamicParameter()
public boolean isFixedConditionDynamicParameterRequired()
Copyright © 2014–2015 The DBFlute Project. All rights reserved.