KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > api > ClassMappedEvent


1 /**
2  * Copyright (C) 2004 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package org.objectweb.jorm.api;
19
20 import java.util.EventObject JavaDoc;
21
22 /**
23  * This event is sent when a persistent class is mapped.
24  *
25  * @author S.Chassande-Barrioz
26  */

27 public class ClassMappedEvent extends EventObject JavaDoc {
28
29     /**
30      * The name of the persistent class which has been mapped.
31      */

32     private String JavaDoc jormClassName;
33
34     /**
35      * @param mapper is the mapper containing the new persistent class. The
36      * mapper is the source of the event.
37      * @param jormClassName is the name of the persistent class which has
38      * been mapped.
39      */

40     public ClassMappedEvent(PMapper mapper, String JavaDoc jormClassName) {
41         super(mapper);
42         this.jormClassName = jormClassName;
43     }
44
45     /**
46      * @return the mapper containing the new persistent class. The
47      * mapper is the source of the event.
48      */

49     public PMapper getPMapper() {
50         return (PMapper) source;
51     }
52
53     /**
54      * @return The name of the persistent class which has been mapped.
55      */

56     public String JavaDoc getJormClassName() {
57         return jormClassName;
58     }
59 }
60
Popular Tags