本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}