001: /*
002: * Hammurapi
003: * Automated Java code review system.
004: * Copyright (C) 2004 Hammurapi Group
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * URL: http://www.hammurapi.org
021: * e-Mail: support@hammurapi.biz
022: */
023: package org.hammurapi.inspectors.testcases.violations;
024:
025: import java.rmi.RemoteException;
026:
027: import javax.ejb.CreateException;
028: import javax.ejb.EntityBean;
029: import javax.ejb.EntityContext;
030:
031: /**
032: * EjbPostCreateModifiersRule
033: * @author Pavel Vlasov
034: * @version $Revision: 1.1 $
035: */
036: public class EjbPostCreateModifiersRuleViolationTestCase implements
037: EntityBean {
038:
039: private static org.apache.log4j.Logger logger = org.apache.log4j.Logger
040: .getRootLogger();
041:
042: private transient EntityContext objcContext;
043:
044: private Integer mProdSubmissionID = null;
045:
046: /** Java doc automaticaly generated by Hammurapi */
047: public void setEntityContext(final EntityContext objaContext) {
048: this .objcContext = objaContext;
049: }
050:
051: /** Java doc automaticaly generated by Hammurapi */
052: public void unsetEntityContext() {
053: objcContext = null;
054: }
055:
056: /** Java doc automaticaly generated by Hammurapi */
057: public void ejbActivate() {
058: }
059:
060: /** Java doc automaticaly generated by Hammurapi */
061: public void ejbPassivate() {
062: }
063:
064: /** Java doc automaticaly generated by Hammurapi */
065: public void ejbLoad() {
066: }
067:
068: /** Java doc automaticaly generated by Hammurapi */
069: public void ejbStore() {
070: }
071:
072: /** Java doc automaticaly generated by Hammurapi */
073: public void ejbRemove() {
074: }
075:
076: /** Java doc automaticaly generated by Hammurapi */
077: public Integer ejbCreate() throws CreateException, RemoteException {
078: this .mProdSubmissionID = new Integer(0);
079: return this .mProdSubmissionID;
080: }
081:
082: // --- VIOLATION ---
083: void ejbPostCreate() {
084: }
085:
086: /** Java doc automaticaly generated by Hammurapi */
087: public Integer ejbCreate(final int pProdSubmissionID)
088: throws CreateException, RemoteException {
089: return new Integer(pProdSubmissionID);
090: }
091:
092: // --- VIOLATION ---
093: static void ejbPostCreate(final int pProdSubmissionID) {
094: }
095:
096: /** Java doc automaticaly generated by Hammurapi */
097: public Integer ejbCreate(final Integer pProdSubmissionID)
098: throws CreateException, RemoteException {
099:
100: this .mProdSubmissionID = pProdSubmissionID;
101: return this .mProdSubmissionID;
102: }
103:
104: // --- VIOLATION ---
105: /** Java doc automaticaly generated by Hammurapi */
106: public final void ejbPostCreate(final Integer pProdSubmissionID) {
107: }
108: }
|