Search in sources :

Example 11 with TnBeanMetaData

use of org.dbflute.s2dao.metadata.TnBeanMetaData in project dbflute-core by dbflute.

the class TnRelationRowCreatorExtension method setupRelationKeyValue.

// ===================================================================================
// Relation KeyValue Setup
// =======================
@Override
protected void setupRelationKeyValue(TnRelationRowCreationResource res) {
    // /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    // setup of relation key is handled at all-value setup marked as '#RELKEY'
    // so only entity instance creation exists in this method
    // = = = = = = = = = =/
    final TnRelationPropertyType rpt = res.getRelationPropertyType();
    final TnBeanMetaData yourBmd = rpt.getYourBeanMetaData();
    if (!res.hasRowInstance()) {
        // always no instance here (check just in case)
        final DBMeta dbmeta = yourBmd.getDBMeta();
        final Object row = newRelationRow(rpt, res.getRelationSelector(), res.getRelationNoSuffix(), dbmeta);
        res.setRow(row);
    }
}
Also used : TnRelationPropertyType(org.dbflute.s2dao.metadata.TnRelationPropertyType) DBMeta(org.dbflute.dbmeta.DBMeta) TnBeanMetaData(org.dbflute.s2dao.metadata.TnBeanMetaData)

Aggregations

TnBeanMetaData (org.dbflute.s2dao.metadata.TnBeanMetaData)11 TnPropertyType (org.dbflute.s2dao.metadata.TnPropertyType)7 ArrayList (java.util.ArrayList)4 TnRelationPropertyType (org.dbflute.s2dao.metadata.TnRelationPropertyType)3 Timestamp (java.sql.Timestamp)2 Map (java.util.Map)2 ConditionBean (org.dbflute.cbean.ConditionBean)2 DBMeta (org.dbflute.dbmeta.DBMeta)2 ValueType (org.dbflute.jdbc.ValueType)2 List (java.util.List)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 DfPropertyDesc (org.dbflute.helper.beans.DfPropertyDesc)1 OutsideSqlContext (org.dbflute.outsidesql.OutsideSqlContext)1 TnIdentifierGenerator (org.dbflute.s2dao.identity.TnIdentifierGenerator)1 TnPropertyMapping (org.dbflute.s2dao.metadata.TnPropertyMapping)1 TnBeanMetaDataImpl (org.dbflute.s2dao.metadata.impl.TnBeanMetaDataImpl)1 TnRelationRowCache (org.dbflute.s2dao.rowcreator.TnRelationRowCache)1 TnRelationSelector (org.dbflute.s2dao.rowcreator.TnRelationSelector)1