KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > verifier > tests > ejb > entity > ejbfindermethod > EjbFinderMethodDescription


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.verifier.tests.ejb.entity.ejbfindermethod;
24
25 import com.sun.enterprise.tools.verifier.tests.ejb.EjbTest;
26 import com.sun.enterprise.deployment.EjbDescriptor;
27 import com.sun.enterprise.deployment.EjbSessionDescriptor;
28 import com.sun.enterprise.tools.verifier.tests.ejb.EjbCheck;
29 import com.sun.enterprise.tools.verifier.*;
30
31 /**
32  * Note that the ejbFind<METHOD> names and parameter signatures do not
33  * provide the container tools with sufficient information for automatically
34  * generating the implementation of the finder methods for methods other than
35  * ejbFindByPrimaryKey. Therefore, the bean provider is responsible for
36  * providing a description of each finder method. The entity bean Deployer
37  * uses container tools to generate the implementation of the finder methods
38  * based in the description supplied by the bean provider. The Enterprise
39  * JavaBeans architecture does not specify the format of the finder method
40  * description.
41  */

42 public class EjbFinderMethodDescription extends EjbTest implements EjbCheck {
43
44
45     /**
46      * Note that the ejbFind<METHOD> names and parameter signatures do not
47      * provide the container tools with sufficient information for automatically
48      * generating the implementation of the finder methods for methods other than
49      * ejbFindByPrimaryKey. Therefore, the bean provider is responsible for
50      * providing a description of each finder method. The entity bean Deployer
51      * uses container tools to generate the implementation of the finder methods
52      * based in the description supplied by the bean provider. The Enterprise
53      * JavaBeans architecture does not specify the format of the finder method
54      * description.
55      *
56      * @param descriptor the Enterprise Java Bean deployment descriptor
57      *
58      * @return <code>Result</code> the results for this assertion
59      */

60     public Result check(EjbDescriptor descriptor) {
61
62     Result result = getInitializedResult();
63
64     // Stub test class placeholder
65
// fill in guts/logic - pass/fail accordingly in future
66
result.setStatus(Result.NOT_IMPLEMENTED);
67     result.addNaDetails
68         (smh.getLocalString
69          (getClass().getName() + ".notImplemented",
70           "No static testing done - yet."));
71     return result;
72     }
73 }
74
Popular Tags