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.fixes;
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: * EjbCreateModifiersRule
033: * @author Pavel Vlasov
034: * @version $Revision: 1.1 $
035: */
036: public class EjbCreateModifiersRuleFixTestCase implements EntityBean {
037:
038: private static final org.apache.log4j.Logger logger = org.apache.log4j.Logger
039: .getRootLogger();
040:
041: private transient EntityContext objcContext;
042:
043: private Integer mProdSubmissionID = null;
044:
045: /** Java doc automaticaly generated by Hammurapi */
046: public void setEntityContext(final EntityContext objaContext) {
047: this .objcContext = objaContext;
048: }
049:
050: /** Java doc automaticaly generated by Hammurapi */
051: public void unsetEntityContext() {
052: objcContext = null;
053: }
054:
055: /** Java doc automaticaly generated by Hammurapi */
056: public void ejbActivate() {
057: }
058:
059: /** Java doc automaticaly generated by Hammurapi */
060: public void ejbPassivate() {
061: }
062:
063: /** Java doc automaticaly generated by Hammurapi */
064: public void ejbLoad() {
065: }
066:
067: /** Java doc automaticaly generated by Hammurapi */
068: public void ejbStore() {
069: }
070:
071: /** Java doc automaticaly generated by Hammurapi */
072: public void ejbRemove() {
073: }
074:
075: // --- FIX ---
076: /** Java doc automaticaly generated by Hammurapi */
077: public Integer ejbCreate() throws CreateException, RemoteException {
078:
079: this .mProdSubmissionID = new Integer(0);
080: return this .mProdSubmissionID;
081: }
082:
083: /** Java doc automaticaly generated by Hammurapi */
084: public void ejbPostCreate() {
085: }
086:
087: // --- FIX ---
088: /** Java doc automaticaly generated by Hammurapi */
089: public Integer ejbCreate(final int pProdSubmissionID)
090: throws CreateException, RemoteException {
091:
092: return new Integer(pProdSubmissionID);
093: }
094:
095: /** Java doc automaticaly generated by Hammurapi */
096: public void ejbPostCreate(final int pProdSubmissionID) {
097: }
098:
099: // --- FIX ---
100: /** Java doc automaticaly generated by Hammurapi */
101: public Integer ejbCreate(final Integer pProdSubmissionID)
102: throws CreateException, RemoteException {
103:
104: this .mProdSubmissionID = pProdSubmissionID;
105: return this .mProdSubmissionID;
106: }
107:
108: /** Java doc automaticaly generated by Hammurapi */
109: public void ejbPostCreate(final Integer pProdSubmissionID) {
110: }
111: }
|