public void merge(JBossEnterpriseBeanMetaData overrideEjb, JBossEnterpriseBeanMetaData originalEjb)
{
super.merge(overrideEjb, originalEjb);
CMPFieldsMetaData originalFields = null;
SecurityRoleRefsMetaData originalRoles = null;
ClusterConfigMetaData originalCluster = null;
CacheInvalidationConfigMetaData originalCacheInv = null;
JBossEntityBeanMetaData original = originalEjb instanceof JBossGenericBeanMetaData ? null : (JBossEntityBeanMetaData) originalEjb;
if(original != null)
{
if(original.abstractSchemaName != null)
abstractSchemaName = original.abstractSchemaName;
if(original.cmpVersion != null)
cmpVersion = original.cmpVersion;
if(original.home != null)
home = original.home;
if(original.jndiName != null)
jndiName = original.jndiName;
if(original.local != null)
local = original.local;
if(original.localHome != null)
localHome = original.localHome;
if(original.primKeyClass != null)
primKeyClass = original.primKeyClass;
if(original.primKeyField != null)
primKeyField = original.primKeyField;
if(original.remote != null)
remote = original.remote;
// boolean should be changed to java.lang.Boolean to differentiate
// between the default and non-set value
if(original.cacheInvalidation)
cacheInvalidation = original.cacheInvalidation;
if(original.callByValue)
callByValue = original.callByValue;
if(original.clustered)
clustered = original.clustered;
if(original.readOnly)
readOnly = original.readOnly;
if(original.reentrant)
reentrant = original.reentrant;
if(original.persistenceType != null)
persistenceType = original.persistenceType;
if(original.queries != null)
queries = original.queries;
originalFields = original.cmpFields;
originalRoles = original.securityRoleRefs;
originalCluster = original.clusterConfig;
originalCacheInv = original.cacheInvalidationConfig;
}
CMPFieldsMetaData overrideFields = null;
SecurityRoleRefsMetaData overrideRoles = null;
ClusterConfigMetaData overrideCluster = null;
CacheInvalidationConfigMetaData overrideCacheInv = null;
JBossEntityBeanMetaData override = overrideEjb instanceof JBossGenericBeanMetaData ? null : (JBossEntityBeanMetaData) overrideEjb;
if(override != null)
{
if(override.abstractSchemaName != null)
abstractSchemaName = override.abstractSchemaName;
if(override.cmpVersion != null)
cmpVersion = override.cmpVersion;
if(override.home != null)
home = override.home;
if(override.jndiName != null)
jndiName = override.jndiName;
if(override.local != null)
local = override.local;
if(override.localHome != null)
localHome = override.localHome;
if(override.primKeyClass != null)
primKeyClass = override.primKeyClass;
if(override.primKeyField != null)
primKeyField = override.primKeyField;
if(override.remote != null)
remote = override.remote;
// boolean should be changed to java.lang.Boolean to differentiate
// between the default and non-set value
if(override.cacheInvalidation)
cacheInvalidation = override.cacheInvalidation;
if(override.callByValue)
callByValue = override.callByValue;
if(override.clustered)
clustered = override.clustered;
if(override.readOnly)
readOnly = override.readOnly;
if(override.reentrant)
reentrant = override.reentrant;
if(override.persistenceType != null)
persistenceType = override.persistenceType;
if(override.queries != null)
queries = override.queries;
overrideFields = override.cmpFields;
overrideRoles = override.securityRoleRefs;
overrideCluster = override.clusterConfig;
overrideCacheInv = override.cacheInvalidationConfig;
}
if(originalFields != null || overrideFields != null)
{
if(cmpFields == null)
cmpFields = new CMPFieldsMetaData();
cmpFields.merge(overrideFields, originalFields);
}
if(originalRoles != null || overrideRoles != null)
{
if(securityRoleRefs == null)
securityRoleRefs = new SecurityRoleRefsMetaData();
securityRoleRefs.merge(overrideRoles, originalRoles);
}
if(originalCluster != null || overrideCluster != null)
{