001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Rodrigo Westrupp
028: */
029:
030: package com.caucho.amber.cfg;
031:
032: /**
033: * <mapped-superclass> tag in the orm.xml
034: */
035: public class MappedSuperclassConfig extends AbstractEnhancedConfig {
036:
037: // attributes
038: private String _className;
039: private boolean _isMetadataComplete;
040:
041: // elements
042: private String _description;
043: private IdClassConfig _idClass;
044: private boolean _excludeDefaultListeners;
045: private boolean _excludeSuperclassListeners;
046: private EntityListenersConfig _entityListeners;
047: private PrePersistConfig _prePersist;
048: private PostPersistConfig _postPersist;
049: private PreRemoveConfig _preRemove;
050: private PostRemoveConfig _postRemove;
051: private PreUpdateConfig _preUpdate;
052: private PostUpdateConfig _postUpdate;
053: private PostLoadConfig _postLoad;
054: private AttributesConfig _attributes;
055:
056: /**
057: * Returns the attributes.
058: */
059: public AttributesConfig getAttributes() {
060: return _attributes;
061: }
062:
063: /**
064: * Returns the class name.
065: */
066: public String getClassName() {
067: return _className;
068: }
069:
070: /**
071: * Returns true if the metadata is complete.
072: */
073: public boolean isMetaDataComplete() {
074: return _isMetadataComplete;
075: }
076:
077: /**
078: * Sets the attributes.
079: */
080: public void setAttributes(AttributesConfig attributes) {
081: _attributes = attributes;
082: }
083:
084: /**
085: * Sets the class name.
086: */
087: public void addClass(String className) {
088: _className = className;
089: }
090:
091: /**
092: * Sets the metadata is complete (true) or not (false).
093: */
094: public void setMetaDataComplete(boolean isMetaDataComplete) {
095: _isMetadataComplete = isMetaDataComplete;
096: }
097:
098: public String getDescription() {
099: return _description;
100: }
101:
102: public void setDescription(String description) {
103: _description = description;
104: }
105:
106: public IdClassConfig getIdClass() {
107: return _idClass;
108: }
109:
110: public void setIdClass(IdClassConfig idClass) {
111: _idClass = idClass;
112: }
113:
114: public boolean getExcludeDefaultListeners() {
115: return _excludeDefaultListeners;
116: }
117:
118: public void setExcludeDefaultListeners(
119: boolean excludeDefaultListeners) {
120: _excludeDefaultListeners = excludeDefaultListeners;
121: }
122:
123: public boolean getExcludeSuperclassListeners() {
124: return _excludeSuperclassListeners;
125: }
126:
127: public void setExcludeSuperclassListeners(
128: boolean excludeSuperclassListeners) {
129: _excludeSuperclassListeners = excludeSuperclassListeners;
130: }
131:
132: public EntityListenersConfig getEntityListeners() {
133: return _entityListeners;
134: }
135:
136: public void setEntityListeners(EntityListenersConfig entityListeners) {
137: _entityListeners = entityListeners;
138: }
139:
140: public PrePersistConfig getPrePersist() {
141: return _prePersist;
142: }
143:
144: public void setPrePersist(PrePersistConfig prePersist) {
145: _prePersist = prePersist;
146: }
147:
148: public PostPersistConfig getPostPersist() {
149: return _postPersist;
150: }
151:
152: public void setPostPersist(PostPersistConfig postPersist) {
153: _postPersist = postPersist;
154: }
155:
156: public PreRemoveConfig getPreRemove() {
157: return _preRemove;
158: }
159:
160: public void setPreRemove(PreRemoveConfig preRemove) {
161: _preRemove = preRemove;
162: }
163:
164: public PostRemoveConfig getPostRemove() {
165: return _postRemove;
166: }
167:
168: public void setPostRemove(PostRemoveConfig postRemove) {
169: _postRemove = postRemove;
170: }
171:
172: public PreUpdateConfig getPreUpdate() {
173: return _preUpdate;
174: }
175:
176: public void setPreUpdate(PreUpdateConfig preUpdate) {
177: _preUpdate = preUpdate;
178: }
179:
180: public PostUpdateConfig getPostUpdate() {
181: return _postUpdate;
182: }
183:
184: public void setPostUpdate(PostUpdateConfig postUpdate) {
185: _postUpdate = postUpdate;
186: }
187:
188: public PostLoadConfig getPostLoad() {
189: return _postLoad;
190: }
191:
192: public void setPostLoad(PostLoadConfig postLoad) {
193: _postLoad = postLoad;
194: }
195:
196: public String toString() {
197: return "MappedSuperclassConfig[" + _className + "]";
198: }
199: }
|