/* */ {
/* 1668 */ boolean status = true;
/* */
/* 1675 */ if (!hasEntityBeanInterface(this.bean))
/* */ {
/* 1677 */ fireSpecViolationEvent(entity, new Section("10.6.2.a"));
/* 1678 */ status = false;
/* */ }
/* */
/* 1685 */ if ((!isPublic(this.bean)) || (!isAbstract(this.bean)))
/* */ {
/* 1687 */ fireSpecViolationEvent(entity, new Section("10.6.2.b"));
/* 1688 */ status = false;
/* */ }
/* */
/* 1696 */ if (!hasDefaultConstructor(this.bean))
/* */ {
/* 1698 */ fireSpecViolationEvent(entity, new Section("10.6.2.c"));
/* 1699 */ status = false;
/* */ }
/* */
/* 1706 */ if (hasFinalizer(this.bean))
/* */ {
/* 1708 */ fireSpecViolationEvent(entity, new Section("10.6.2.d"));
/* 1709 */ status = false;
/* */ }
/* */
/* 1725 */ if (hasEJBCreateMethod(this.bean, false))
/* */ {
/* 1727 */ Iterator it = getEJBCreateMethods(this.bean);
/* 1728 */ while (it.hasNext())
/* */ {
/* 1730 */ Method ejbCreate = (Method)it.next();
/* 1731 */ if (!isPublic(ejbCreate))
/* */ {
/* 1733 */ fireSpecViolationEvent(entity, ejbCreate, new Section("10.6.4.b"));
/* */
/* 1735 */ status = false;
/* */ }
/* */
/* 1738 */ if ((isFinal(ejbCreate)) || (isStatic(ejbCreate)))
/* */ {
/* 1740 */ fireSpecViolationEvent(entity, ejbCreate, new Section("10.6.4.c"));
/* */
/* 1742 */ status = false;
/* */ }
/* */
/* 1745 */ if (!hasPrimaryKeyReturnType(entity, ejbCreate))
/* */ {
/* 1747 */ fireSpecViolationEvent(entity, ejbCreate, new Section("10.6.4.d"));
/* */
/* 1749 */ status = false;
/* */ }
/* */
/* 1766 */ if (!throwsCreateException(ejbCreate))
/* */ {
/* 1768 */ fireSpecViolationEvent(entity, ejbCreate, new Section("10.6.4.g"));
/* */
/* 1770 */ status = false;
/* */ }
/* */
/* */ }
/* */
/* */ }
/* */
/* 1788 */ if (hasEJBCreateMethod(this.bean, false))
/* */ {
/* 1790 */ Iterator it = getEJBCreateMethods(this.bean);
/* */
/* 1792 */ while (it.hasNext())
/* */ {
/* 1794 */ Method ejbCreate = (Method)it.next();
/* */
/* 1796 */ if (!hasMatchingEJBPostCreate(this.bean, ejbCreate))
/* */ {
/* 1798 */ fireSpecViolationEvent(entity, ejbCreate, new Section("10.6.5.a"));
/* */
/* 1800 */ status = false;
/* */ }
/* */
/* 1803 */ if (hasMatchingEJBPostCreate(this.bean, ejbCreate))
/* */ {
/* 1805 */ Method ejbPostCreate = getMatchingEJBPostCreate(this.bean, ejbCreate);
/* */
/* 1808 */ if (!isPublic(ejbPostCreate))
/* */ {
/* 1810 */ fireSpecViolationEvent(entity, ejbPostCreate, new Section("10.6.5.b"));
/* */
/* 1812 */ status = false;
/* */ }
/* */
/* 1815 */ if (isStatic(ejbPostCreate))
/* */ {
/* 1817 */ fireSpecViolationEvent(entity, ejbPostCreate, new Section("10.6.5.c"));
/* */
/* 1819 */ status = false;
/* */ }
/* */
/* 1822 */ if (isFinal(ejbPostCreate))
/* */ {
/* 1824 */ fireSpecViolationEvent(entity, ejbPostCreate, new Section("10.6.5.d"));
/* */
/* 1826 */ status = false;
/* */ }
/* */
/* 1829 */ if (!hasVoidReturnType(ejbPostCreate))
/* */ {
/* 1831 */ fireSpecViolationEvent(entity, ejbPostCreate, new Section("10.6.5.e"));
/* */
/* 1833 */ status = false;
/* */ }
/* */
/* */ }
/* */
/* */ }
/* */
/* */ }
/* */
/* 1848 */ Iterator it = getEjbHomeMethods(this.bean);
/* 1849 */ while (it.hasNext())
/* */ {
/* 1851 */ Method ejbHome = (Method)it.next();
/* 1852 */ if (!isPublic(ejbHome))
/* */ {
/* 1854 */ fireSpecViolationEvent(entity, ejbHome, new Section("10.6.6.a"));
/* 1855 */ status = false;
/* */ }
/* */
/* 1858 */ if (isStatic(ejbHome))
/* */ {
/* 1860 */ fireSpecViolationEvent(entity, ejbHome, new Section("10.6.6.b"));
/* 1861 */ status = false;
/* */ }
/* */
/* 1864 */ if (throwsRemoteException(ejbHome))
/* */ {
/* 1866 */ fireSpecViolationEvent(entity, ejbHome, new Section("10.6.6.c"));
/* 1867 */ status = false;
/* */ }
/* */
/* */ }
/* */
/* 1876 */ it = entity.getCMPFields();
/* 1877 */ while (it.hasNext())
/* */ {
/* 1879 */ String fieldName = (String)it.next();
/* 1880 */ String getName = "get" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
/* */
/* 1882 */ Class fieldType = null;
/* */ try
/* */ {
/* 1886 */ Method m = this.bean.getMethod(getName, new Class[0]);
/* 1887 */ fieldType = m.getReturnType();
/* */
/* 1891 */ if (fieldType == Void.TYPE)
/* */ {
/* 1893 */ fireSpecViolationEvent(entity, new Section("jb.7.1.b", "Field: " + fieldName));
/* */ }
/* */
/* */ }
/* */ catch (NoSuchMethodException nsme)
/* */ {
/* 1899 */ fireSpecViolationEvent(entity, new Section("10.6.2.g", "Field: " + fieldName));
/* */
/* 1901 */ status = false;
/* */ }
/* */
/* 1904 */ String setName = "set" + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
/* */
/* 1906 */ Class[] args = new Class[1];
/* 1907 */ args[0] = fieldType;
/* */ try
/* */ {
/* 1911 */ Method m = this.bean.getMethod(setName, args);
/* 1912 */ fieldType = m.getReturnType();
/* */
/* 1916 */ if (fieldType != Void.TYPE)
/* */ {
/* 1918 */ fireSpecViolationEvent(entity, new Section("jb.7.1.a", "Field: " + fieldName));
/* */ }
/* */
/* */ }
/* */ catch (NoSuchMethodException nsme)
/* */ {
/* */ try
/* */ {
/* 1930 */ args[0] = this.classloader.loadClass("java.util.Collection");
/* 1931 */ m = this.bean.getMethod(setName, args);
/* */ }
/* */ catch (NoSuchMethodException nsme2)
/* */ {
/* */ Method m;
/* 1935 */ fireSpecViolationEvent(entity, new Section("10.6.2.h", "Field: " + fieldName));
/* */
/* 1937 */ status = false;
/* */ }
/* */ catch (ClassNotFoundException cnfe)
/* */ {
/* */ }
/* */
/* */ }
/* */
/* */ }
/* */
/* 1955 */ it = getEjbSelectMethods(this.bean);
/* 1956 */ while (it.hasNext())
/* */ {
/* 1958 */ Method ejbSelect = (Method)it.next();
/* */
/* 1960 */ if (!isPublic(ejbSelect))
/* */ {
/* 1962 */ fireSpecViolationEvent(entity, ejbSelect, new Section("10.6.7.a"));
/* 1963 */ status = false;
/* */ }
/* */
/* 1966 */ if (!isAbstract(ejbSelect))
/* */ {
/* 1968 */ fireSpecViolationEvent(entity, ejbSelect, new Section("10.6.7.b"));
/* 1969 */ status = false;
/* */ }
/* */
/* 1972 */ if (!throwsFinderException(ejbSelect))
/* */ {
/* 1974 */ fireSpecViolationEvent(entity, ejbSelect, new Section("10.6.7.c"));
/* 1975 */ status = false;
/* */ }
/* */
/* 1978 */ if (!hasMatchingQuery(ejbSelect, entity))
/* */ {
/* 1980 */ fireSpecViolationEvent(entity, ejbSelect, new Section("10.5.7"));
/* 1981 */ status = false;
/* */ }
/* */
/* */ }
/* */
/* 1989 */ if (hasFinderMethod(this.bean))
/* */ {
/* 1991 */ fireSpecViolationEvent(entity, new Section("10.6.2.i"));
/* 1992 */ status = false;
/* */ }
/* */
/* 1995 */ return status;
/* */ }