当前位置: 首页>>代码示例>>Java>>正文


Java ClassOrInterfaceTypeDetails.getLayerEntities方法代码示例

本文整理汇总了Java中org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails.getLayerEntities方法的典型用法代码示例。如果您正苦于以下问题:Java ClassOrInterfaceTypeDetails.getLayerEntities方法的具体用法?Java ClassOrInterfaceTypeDetails.getLayerEntities怎么用?Java ClassOrInterfaceTypeDetails.getLayerEntities使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails的用法示例。


在下文中一共展示了ClassOrInterfaceTypeDetails.getLayerEntities方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRelatedEntityComponent

import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails; //导入方法依赖的package包/类
/**
 * If the given governor is a layer component (service, repository, etc.)
 * that manages an service for which we maintain web scaffold met-adata,
 * returns the ID of that meta-data, otherwise returns <code>null</code>.
 * <p/>
 * TODO doesn't handle the case where the governor is a component that
 * manages multiple entities, as it always returns the MID for the first
 * service found (in annotation order) for which we provide web meta-data.
 * We would need to enhance
 * {@link AbstractMemberDiscoveringItdMetadataProvider#getLocalMidToRequest}
 * to return a list of MIDs, rather than only one.
 * 
 * @param governor the governor to check (required)
 * @return see above
 */
private String getRelatedEntityComponent(final JavaType governor) {
    final ClassOrInterfaceTypeDetails governorTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (governorTypeDetails != null) {
        for (final JavaType type : governorTypeDetails.getLayerEntities()) {
            final String localMid = entityToBatchMidMap.get(type);
            if (localMid != null) {
                // The ITD's governor is a layer component that manages an
                // service for which we maintain web scaffold metadata =>
                // refresh that MD in case a layer has appeared or gone
                // away.
                return localMid;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:33,代码来源:WebJpaBatchMetadataProvider.java

示例2: getWebScaffoldMidIfLayerComponent

import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails; //导入方法依赖的package包/类
/**
 * If the given governor is a layer component (service, repository, etc.)
 * that manages an entity for which we maintain web scaffold metadata,
 * returns the ID of that metadata, otherwise returns <code>null</code>.
 * TODO doesn't handle the case where the governor is a component that
 * manages multiple entities, as it always returns the MID for the first
 * entity found (in annotation order) for which we provide web metadata. We
 * would need to enhance
 * {@link AbstractMemberDiscoveringItdMetadataProvider#getLocalMidToRequest}
 * to return a list of MIDs, rather than only one.
 * 
 * @param governor the governor to check (required)
 * @return see above
 */
private String getWebScaffoldMidIfLayerComponent(final JavaType governor) {
    final ClassOrInterfaceTypeDetails governorTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (governorTypeDetails != null) {
        for (final JavaType type : governorTypeDetails.getLayerEntities()) {
            final String localMid = entityToWebScaffoldMidMap.get(type);
            if (localMid != null) {
                /*
                 * The ITD's governor is a layer component that manages an
                 * entity for which we maintain web scaffold metadata =>
                 * refresh that MD in case a layer has appeared or gone
                 * away.
                 */
                return localMid;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:34,代码来源:WebScaffoldMetadataProviderImpl.java

示例3: getRelatedEntityComponent

import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails; //导入方法依赖的package包/类
/**
 * If the given governor is a layer component (service, repository, etc.)
 * that manages an entity for which we maintain web scaffold metadata,
 * returns the ID of that metadata, otherwise returns <code>null</code>.
 * TODO doesn't handle the case where the governor is a component that
 * manages multiple entities, as it always returns the MID for the first
 * entity found (in annotation order) for which we provide web metadata. We
 * would need to enhance
 * {@link AbstractMemberDiscoveringItdMetadataProvider#getLocalMidToRequest}
 * to return a list of MIDs, rather than only one.
 * 
 * @param governor the governor to check (required)
 * @return see above
 */
private String getRelatedEntityComponent(final JavaType governor) {
    final ClassOrInterfaceTypeDetails governorTypeDetails = getTypeLocationService()
            .getTypeDetails(governor);
    if (governorTypeDetails != null) {
        for (final JavaType type : governorTypeDetails.getLayerEntities()) {
            final String localMid = entityToAuditMidMap.get(type);
            if (localMid != null) {
                /*
                 * The ITD's governor is a layer component that manages an
                 * entity for which we maintain web scaffold metadata =>
                 * refresh that MD in case a layer has appeared or gone
                 * away.
                 */
                return localMid;
            }
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:34,代码来源:JpaAuditListenerMetadataProvider.java

示例4: getWebJsonMidIfLayerComponent

import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails; //导入方法依赖的package包/类
/**
 * If the given type is a layer component (e.g. repository or service),
 * returns the ID of the WebJsonMetadata for the first (!) domain type it
 * manages, in case this is a new layer component that the JSON ITD needs to
 * use.
 * 
 * @param governorTypeDetails the type to check (required)
 */
private String getWebJsonMidIfLayerComponent(
        final ClassOrInterfaceTypeDetails governorTypeDetails) {
    for (final JavaType domainType : governorTypeDetails.getLayerEntities()) {
        final String webJsonMetadataId = managedEntityTypes.get(domainType);
        if (webJsonMetadataId != null) {
            return webJsonMetadataId;
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:19,代码来源:WebJsonMetadataProviderImpl.java


注:本文中的org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails.getLayerEntities方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。