PluralProperty.java 文件源码

java
阅读 37 收藏 0 点赞 0 评论 0

项目:org.fastnate 作者:
/**
 * Builds the name of the table of the association for the given field.
 *
 * @param attribute
 *            the inspected field
 * @param override
 *            contains optional override options
 * @param joinTable
 *            the optional join table
 * @param collectionTable
 *            the optional metadata of the table
 * @param defaultTableName
 *            the default name for the table
 * @return the table name
 */
protected static String buildTableName(final AttributeAccessor attribute, final AssociationOverride override,
        final JoinTable joinTable, final CollectionTable collectionTable, final String defaultTableName) {
    if (override != null) {
        final JoinTable joinTableOverride = override.joinTable();
        if (joinTableOverride != null && joinTableOverride.name().length() > 0) {
            return joinTableOverride.name();
        }
    }
    if (joinTable != null && joinTable.name().length() > 0) {
        return joinTable.name();
    }
    if (collectionTable != null && collectionTable.name().length() > 0) {
        return collectionTable.name();
    }
    return defaultTableName;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号