FileDocCategorySizeDatePackage
SelectMethodModifiers.javaAPI DocGlassfish v2 API4020Fri May 04 22:33:40 BST 2007com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2

SelectMethodModifiers

public class SelectMethodModifiers extends SelectMethodTest
Select methods must be public and abstract
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
protected booleanrunIndividualSelectTest(java.lang.reflect.Method m, EjbCMPEntityDescriptor descriptor, com.sun.enterprise.tools.verifier.Result result)

run an individual test against a declared ejbSelect method

param
m is the ejbSelect method
param
descriptor is the entity declaring the ejbSelect
param
result is where to put the result
return
true if the test passes

        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        int modifiers = m.getModifiers();
        if (Modifier.isPublic(modifiers) && Modifier.isAbstract(modifiers) ) {
	    result.addGoodDetails(smh.getLocalString
				       ("tests.componentNameConstructor",
					"For [ {0} ]",
					new Object[] {compName.toString()}));
            result.addGoodDetails(smh.getLocalString
    		("com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2.SelectMethodModifiers.passed",
                "[ {0} ] is declared public and abstract",
		new Object[] {m.getName()}));                                                       
            return true;
        } else {
	    result.addErrorDetails(smh.getLocalString
				       ("tests.componentNameConstructor",
					"For [ {0} ]",
					new Object[] {compName.toString()}));
            result.addErrorDetails(smh.getLocalString
	        ("com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2.SelectMethodModifiers.failed",
                "Error : [ {0} ] is not declared public and abstract",
		new Object[] {m.getName()}));                                                    
            return false;            
        }