|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| BaseInsertOperation.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 | /** | |
| 2 | * EasyBeans | |
| 3 | * Copyright (C) 2006 Bull S.A.S. | |
| 4 | * Contact: easybeans@objectweb.org | |
| 5 | * | |
| 6 | * This library is free software; you can redistribute it and/or | |
| 7 | * modify it under the terms of the GNU Lesser General Public | |
| 8 | * License as published by the Free Software Foundation; either | |
| 9 | * version 2.1 of the License, or any later version. | |
| 10 | * | |
| 11 | * This library is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | * Lesser General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU Lesser General Public | |
| 17 | * License along with this library; if not, write to the Free Software | |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | |
| 19 | * USA | |
| 20 | * | |
| 21 | * -------------------------------------------------------------------------- | |
| 22 | * $Id: BaseInsertOperation.java 692 2006-06-20 09:17:57Z studzine $ | |
| 23 | * -------------------------------------------------------------------------- | |
| 24 | */ | |
| 25 | package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger; | |
| 26 | ||
| 27 | import javax.ejb.EJB; | |
| 28 | ||
| 29 | import org.objectweb.easybeans.log.JLog; | |
| 30 | import org.objectweb.easybeans.log.JLogFactory; | |
| 31 | import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; | |
| 32 | import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType; | |
| 33 | ||
| 34 | /** | |
| 35 | * @author Eduardo Studzinski Estima de Castro | |
| 36 | * @author Gisele Pinheiro Souza | |
| 37 | */ | |
| 38 | public class BaseInsertOperation { | |
| 39 | ||
| 40 | /** | |
| 41 | * Log helper. | |
| 42 | */ | |
| 43 | private JLog logger = JLogFactory.getLog(BaseInsertOperation.class); | |
| 44 | ||
| 45 | /** | |
| 46 | * Bean logger. | |
| 47 | */ | |
| 48 | @EJB(beanName = "SLSBOperationLoggerAccess") | |
| 49 | private ItfOperationLoggerAccess beanLogger; | |
| 50 | ||
| 51 | /** | |
| 52 | * Log action. | |
| 53 | * @param className the bean class. | |
| 54 | * @param event the event type. | |
| 55 | * @param eventClassName the class where the event method is defined. | |
| 56 | * @param operationType the operationType. | |
| 57 | */ | |
| 58 | 0 | public void log(final Class className, final CallbackType event, final Class eventClassName, |
| 59 | final OperationType operationType) { | |
| 60 | 0 | log(className.getName(), event, eventClassName.getName(), operationType); |
| 61 | } | |
| 62 | ||
| 63 | /** | |
| 64 | * Log action. | |
| 65 | * @param className the bean class. | |
| 66 | * @param event the event type. | |
| 67 | * @param eventClassName the class where the event method is defined. | |
| 68 | * @param operationType the operationType. | |
| 69 | */ | |
| 70 | 0 | public void log(final String className, final CallbackType event, final String eventClassName, |
| 71 | final OperationType operationType) { | |
| 72 | 0 | logger.debug("Logging event in: {0}", className); |
| 73 | 0 | beanLogger.insertOperationLogger(className, event, eventClassName, operationType); |
| 74 | } | |
| 75 | } |
|
||||||||||