Any CMP entity bean should have at least one cmp field defined in the DDs
Result result = getInitializedResult();
if (descriptor instanceof EjbEntityDescriptor) {
String persistentType =
((EjbEntityDescriptor)descriptor).getPersistenceType();
if (EjbEntityDescriptor.CONTAINER_PERSISTENCE.equals(persistentType)) {
EjbCMPEntityDescriptor cmpDesc = (EjbCMPEntityDescriptor) descriptor;
PersistenceDescriptor persDesc = cmpDesc.getPersistenceDescriptor();
if (persDesc.getCMPFields().size()==0) {
result.failed(smh.getLocalString
(getClass().getName()+"failed",
"For CMP entity bean [ {0} ], no cmp field are defined",
new Object[] {descriptor.getName()}));
} else {
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"For CMP entity bean [ {0} ], some cmp fields are defined",
new Object[] {descriptor.getName()}));
}
return result;
}
}
// everything else is NA
result.notApplicable(smh.getLocalString
(getClass().getName() + ".notApplicable",
"The EJB [ {0} ] is not an CMP entity bean",
new Object[] {descriptor.getName()}));
return result;