Title: JAXB2 Java Inheritance # EnterpriseBean superclass
EnterpriseBean.java
/** * * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openejb.jee2; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import java.util.List; import java.util.ArrayList; public abstract class EnterpriseBean { @XmlElement(required = true) protected List description; @XmlElement(name = "display-name", required = true) protected List displayName; @XmlElement(required = true) protected List icon; @XmlElement(name = "ejb-name", required = true) protected String ejbName; @XmlElement(name = "mapped-name") protected String mappedName; @XmlElement(name = "ejb-class") protected String ejbClass; @XmlElement(name = "around-invoke", required = true) protected List aroundInvoke; @XmlElement(name = "env-entry", required = true) protected List envEntry; @XmlElement(name = "ejb-ref", required = true) protected List ejbRef; @XmlElement(name = "ejb-local-ref", required = true) protected List ejbLocalRef; @XmlElement(name = "service-ref", required = true) protected List serviceRef; @XmlElement(name = "resource-ref", required = true) protected List resourceRef; @XmlElement(name = "resource-env-ref", required = true) protected List resourceEnvRef; @XmlElement(name = "message-destination-ref", required = true) protected List messageDestinationRef; @XmlElement(name = "persistence-context-ref", required = true) protected List persistenceContextRef; @XmlElement(name = "persistence-unit-ref", required = true) protected List persistenceUnitRef; @XmlElement(name = "post-construct", required = true) protected List postConstruct; @XmlElement(name = "pre-destroy", required = true) protected List preDestroy; @XmlElement(name = "security-identity") protected SecurityIdentityType securityIdentity; @XmlAttribute @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID protected String id; public List getDescription() { if (description == null) { description = new ArrayList(); } return this.description; } public List getDisplayName() { if (displayName == null) { displayName = new ArrayList(); } return this.displayName; } public List getIcon() { if (icon == null) { icon = new ArrayList(); } return this.icon; } public String getEjbName() { return ejbName; } public void setEjbName(String value) { this.ejbName = value; } public String getMappedName() { return mappedName; } public void setMappedName(String value) { this.mappedName = value; } public String getEjbClass() { return ejbClass; } public void setEjbClass(String value) { this.ejbClass = value; } public List getAroundInvoke() { if (aroundInvoke == null) { aroundInvoke = new ArrayList(); } return this.aroundInvoke; } public List getEnvEntry() { if (envEntry == null) { envEntry = new ArrayList(); } return this.envEntry; } public List getEjbRef() { if (ejbRef == null) { ejbRef = new ArrayList(); } return this.ejbRef; } public List getEjbLocalRef() { if (ejbLocalRef == null) { ejbLocalRef = new ArrayList(); } return this.ejbLocalRef; } public List getServiceRef() { if (serviceRef == null) { serviceRef = new ArrayList(); } return this.serviceRef; } public List getResourceRef() { if (resourceRef == null) { resourceRef = new ArrayList(); } return this.resourceRef; } public List getResourceEnvRef() { if (resourceEnvRef == null) { resourceEnvRef = new ArrayList(); } return this.resourceEnvRef; } public List getMessageDestinationRef() { if (messageDestinationRef == null) { messageDestinationRef = new ArrayList(); } return this.messageDestinationRef; } public List getPersistenceContextRef() { if (persistenceContextRef == null) { persistenceContextRef = new ArrayList(); } return this.persistenceContextRef; } public List getPersistenceUnitRef() { if (persistenceUnitRef == null) { persistenceUnitRef = new ArrayList(); } return this.persistenceUnitRef; } public List getPostConstruct() { if (postConstruct == null) { postConstruct = new ArrayList(); } return this.postConstruct; } public List getPreDestroy() { if (preDestroy == null) { preDestroy = new ArrayList(); } return this.preDestroy; } public SecurityIdentityType getSecurityIdentity() { return securityIdentity; } public void setSecurityIdentity(SecurityIdentityType value) { this.securityIdentity = value; } public String getId() { return id; } public void setId(String value) { this.id = value; } } # SessionBeanType subclass
SessionBeanType.java
/** * * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openejb.jee2; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import java.util.ArrayList; import java.util.List; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "session-beanType", propOrder = { "description", "displayName", "icon", "ejbName", "mappedName", "home", "remote", "localHome", "local", "businessLocal", "businessRemote", "serviceEndpoint", "ejbClass", "sessionType", "timeoutMethod", "initMethod", "removeMethod", "transactionType", "aroundInvoke", "envEntry", "ejbRef", "ejbLocalRef", "serviceRef", "resourceRef", "resourceEnvRef", "messageDestinationRef", "persistenceContextRef", "persistenceUnitRef", "postConstruct", "preDestroy", "postActivate", "prePassivate", "securityRoleRef", "securityIdentity" }) public class SessionBeanType extends EnterpriseBean { protected String home; protected String remote; @XmlElement(name = "local-home") protected String localHome; protected String local; @XmlElement(name = "business-local", required = true) protected List businessLocal; @XmlElement(name = "business-remote", required = true) protected List businessRemote; @XmlElement(name = "service-endpoint") protected String serviceEndpoint; @XmlElement(name = "session-type") protected SessionTypeType sessionType; @XmlElement(name = "timeout-method") protected NamedMethodType timeoutMethod; @XmlElement(name = "init-method", required = true) protected List initMethod; @XmlElement(name = "remove-method", required = true) protected List removeMethod; @XmlElement(name = "transaction-type") protected TransactionTypeType transactionType; @XmlElement(name = "post-activate", required = true) protected List postActivate; @XmlElement(name = "pre-passivate", required = true) protected List prePassivate; @XmlElement(name = "security-role-ref", required = true) protected List securityRoleRef; public String getHome() { return home; } public void setHome(String value) { this.home = value; } public String getRemote() { return remote; } public void setRemote(String value) { this.remote = value; } public String getLocalHome() { return localHome; } public void setLocalHome(String value) { this.localHome = value; } public String getLocal() { return local; } public void setLocal(String value) { this.local = value; } public List getBusinessLocal() { if (businessLocal == null) { businessLocal = new ArrayList(); } return this.businessLocal; } public List getBusinessRemote() { if (businessRemote == null) { businessRemote = new ArrayList(); } return this.businessRemote; } public String getServiceEndpoint() { return serviceEndpoint; } public void setServiceEndpoint(String value) { this.serviceEndpoint = value; } public SessionTypeType getSessionType() { return sessionType; } public void setSessionType(SessionTypeType value) { this.sessionType = value; } public NamedMethodType getTimeoutMethod() { return timeoutMethod; } public void setTimeoutMethod(NamedMethodType value) { this.timeoutMethod = value; } public List getInitMethod() { if (initMethod == null) { initMethod = new ArrayList(); } return this.initMethod; } public List getRemoveMethod() { if (removeMethod == null) { removeMethod = new ArrayList(); } return this.removeMethod; } public TransactionTypeType getTransactionType() { return transactionType; } public void setTransactionType(TransactionTypeType value) { this.transactionType = value; } public List getPostActivate() { if (postActivate == null) { postActivate = new ArrayList(); } return this.postActivate; } public List getPrePassivate() { if (prePassivate == null) { prePassivate = new ArrayList(); } return this.prePassivate; } public List getSecurityRoleRef() { if (securityRoleRef == null) { securityRoleRef = new ArrayList(); } return this.securityRoleRef; } }