blob: 71d7f151704a3d53359f2924247d3cbf27faef8e [file] [log] [blame]
h1. EnterpriseBean superclass
{code:title=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<Text> description;
@XmlElement(name = "display-name", required = true)
protected List<Text> displayName;
@XmlElement(required = true)
protected List<IconType> 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<AroundInvokeType> aroundInvoke;
@XmlElement(name = "env-entry", required = true)
protected List<EnvEntryType> envEntry;
@XmlElement(name = "ejb-ref", required = true)
protected List<EjbRefType> ejbRef;
@XmlElement(name = "ejb-local-ref", required = true)
protected List<EjbLocalRefType> ejbLocalRef;
@XmlElement(name = "service-ref", required = true)
protected List<ServiceRefType> serviceRef;
@XmlElement(name = "resource-ref", required = true)
protected List<ResourceRefType> resourceRef;
@XmlElement(name = "resource-env-ref", required = true)
protected List<ResourceEnvRefType> resourceEnvRef;
@XmlElement(name = "message-destination-ref", required = true)
protected List<MessageDestinationRefType> messageDestinationRef;
@XmlElement(name = "persistence-context-ref", required = true)
protected List<PersistenceContextRefType> persistenceContextRef;
@XmlElement(name = "persistence-unit-ref", required = true)
protected List<PersistenceUnitRefType> persistenceUnitRef;
@XmlElement(name = "post-construct", required = true)
protected List<LifecycleCallbackType> postConstruct;
@XmlElement(name = "pre-destroy", required = true)
protected List<LifecycleCallbackType> preDestroy;
@XmlElement(name = "security-identity")
protected SecurityIdentityType securityIdentity;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
protected String id;
public List<Text> getDescription() {
if (description == null) {
description = new ArrayList<Text>();
}
return this.description;
}
public List<Text> getDisplayName() {
if (displayName == null) {
displayName = new ArrayList<Text>();
}
return this.displayName;
}
public List<IconType> getIcon() {
if (icon == null) {
icon = new ArrayList<IconType>();
}
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<AroundInvokeType> getAroundInvoke() {
if (aroundInvoke == null) {
aroundInvoke = new ArrayList<AroundInvokeType>();
}
return this.aroundInvoke;
}
public List<EnvEntryType> getEnvEntry() {
if (envEntry == null) {
envEntry = new ArrayList<EnvEntryType>();
}
return this.envEntry;
}
public List<EjbRefType> getEjbRef() {
if (ejbRef == null) {
ejbRef = new ArrayList<EjbRefType>();
}
return this.ejbRef;
}
public List<EjbLocalRefType> getEjbLocalRef() {
if (ejbLocalRef == null) {
ejbLocalRef = new ArrayList<EjbLocalRefType>();
}
return this.ejbLocalRef;
}
public List<ServiceRefType> getServiceRef() {
if (serviceRef == null) {
serviceRef = new ArrayList<ServiceRefType>();
}
return this.serviceRef;
}
public List<ResourceRefType> getResourceRef() {
if (resourceRef == null) {
resourceRef = new ArrayList<ResourceRefType>();
}
return this.resourceRef;
}
public List<ResourceEnvRefType> getResourceEnvRef() {
if (resourceEnvRef == null) {
resourceEnvRef = new ArrayList<ResourceEnvRefType>();
}
return this.resourceEnvRef;
}
public List<MessageDestinationRefType> getMessageDestinationRef() {
if (messageDestinationRef == null) {
messageDestinationRef = new ArrayList<MessageDestinationRefType>();
}
return this.messageDestinationRef;
}
public List<PersistenceContextRefType> getPersistenceContextRef() {
if (persistenceContextRef == null) {
persistenceContextRef = new ArrayList<PersistenceContextRefType>();
}
return this.persistenceContextRef;
}
public List<PersistenceUnitRefType> getPersistenceUnitRef() {
if (persistenceUnitRef == null) {
persistenceUnitRef = new ArrayList<PersistenceUnitRefType>();
}
return this.persistenceUnitRef;
}
public List<LifecycleCallbackType> getPostConstruct() {
if (postConstruct == null) {
postConstruct = new ArrayList<LifecycleCallbackType>();
}
return this.postConstruct;
}
public List<LifecycleCallbackType> getPreDestroy() {
if (preDestroy == null) {
preDestroy = new ArrayList<LifecycleCallbackType>();
}
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;
}
}
{code}
h1. SessionBeanType subclass
{code:title=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<String> businessLocal;
@XmlElement(name = "business-remote", required = true)
protected List<String> 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<InitMethodType> initMethod;
@XmlElement(name = "remove-method", required = true)
protected List<RemoveMethodType> removeMethod;
@XmlElement(name = "transaction-type")
protected TransactionTypeType transactionType;
@XmlElement(name = "post-activate", required = true)
protected List<LifecycleCallbackType> postActivate;
@XmlElement(name = "pre-passivate", required = true)
protected List<LifecycleCallbackType> prePassivate;
@XmlElement(name = "security-role-ref", required = true)
protected List<SecurityRoleRefType> 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<String> getBusinessLocal() {
if (businessLocal == null) {
businessLocal = new ArrayList<String>();
}
return this.businessLocal;
}
public List<String> getBusinessRemote() {
if (businessRemote == null) {
businessRemote = new ArrayList<String>();
}
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<InitMethodType> getInitMethod() {
if (initMethod == null) {
initMethod = new ArrayList<InitMethodType>();
}
return this.initMethod;
}
public List<RemoveMethodType> getRemoveMethod() {
if (removeMethod == null) {
removeMethod = new ArrayList<RemoveMethodType>();
}
return this.removeMethod;
}
public TransactionTypeType getTransactionType() {
return transactionType;
}
public void setTransactionType(TransactionTypeType value) {
this.transactionType = value;
}
public List<LifecycleCallbackType> getPostActivate() {
if (postActivate == null) {
postActivate = new ArrayList<LifecycleCallbackType>();
}
return this.postActivate;
}
public List<LifecycleCallbackType> getPrePassivate() {
if (prePassivate == null) {
prePassivate = new ArrayList<LifecycleCallbackType>();
}
return this.prePassivate;
}
public List<SecurityRoleRefType> getSecurityRoleRef() {
if (securityRoleRef == null) {
securityRoleRef = new ArrayList<SecurityRoleRefType>();
}
return this.securityRoleRef;
}
}
{code}