| /******************************************************************************* |
| * Copyright (c) 2011 Oracle. All rights reserved. |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v1.0, which accompanies this distribution |
| * and is available at http://www.eclipse.org/legal/epl-v10.html. |
| * |
| * Contributors: |
| * Oracle - initial API and implementation |
| ******************************************************************************/ |
| package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java; |
| |
| import org.eclipse.jdt.core.dom.CompilationUnit; |
| import org.eclipse.jpt.common.core.utility.TextRange; |
| import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable; |
| import org.eclipse.jpt.common.utility.internal.iterables.ListIterable; |
| import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkMultitenantType2_3; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.TenantDiscriminatorColumn2_3; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkMultitenancy2_3; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkNonEmbeddableTypeMapping; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaReadOnlyTenantDiscriminatorColumn2_3; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaTenantDiscriminatorColumn2_3; |
| import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaVirtualTenantDiscriminatorColumn2_3; |
| |
| public class NullJavaEclipseLinkMultitenancy2_3 |
| extends AbstractJavaJpaContextNode |
| implements JavaEclipseLinkMultitenancy2_3 |
| { |
| |
| public NullJavaEclipseLinkMultitenancy2_3(JavaEclipseLinkNonEmbeddableTypeMapping parent) { |
| super(parent); |
| } |
| |
| // ********** multitenant ********** |
| |
| public boolean isMultitenant() { |
| return false; |
| } |
| |
| public boolean isDefaultMultitenant() { |
| return false; |
| } |
| |
| public boolean isSpecifiedMultitenant() { |
| return false; |
| } |
| |
| public void setSpecifiedMultitenant(boolean isMultitenant) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| |
| // ********** type ********** |
| |
| public EclipseLinkMultitenantType2_3 getType() { |
| return null; |
| } |
| |
| public EclipseLinkMultitenantType2_3 getSpecifiedType() { |
| return null; |
| } |
| |
| public void setSpecifiedType(EclipseLinkMultitenantType2_3 type) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public EclipseLinkMultitenantType2_3 getDefaultType() { |
| return null; |
| } |
| |
| public boolean isIncludeCriteria() { |
| return false; |
| } |
| |
| public Boolean getSpecifiedIncludeCriteria() { |
| return null; |
| } |
| |
| public void setSpecifiedIncludeCriteria(Boolean includeCriteria) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public boolean isDefaultIncludeCriteria() { |
| return false; |
| } |
| |
| public ListIterable<JavaReadOnlyTenantDiscriminatorColumn2_3> getTenantDiscriminatorColumns() { |
| return EmptyListIterable.instance(); |
| } |
| |
| public int getTenantDiscriminatorColumnsSize() { |
| return 0; |
| } |
| |
| public ListIterable<JavaTenantDiscriminatorColumn2_3> getSpecifiedTenantDiscriminatorColumns() { |
| return EmptyListIterable.instance(); |
| } |
| |
| public int getSpecifiedTenantDiscriminatorColumnsSize() { |
| return 0; |
| } |
| |
| public boolean hasSpecifiedTenantDiscriminatorColumns() { |
| return false; |
| } |
| |
| public JavaTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn() { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public JavaTenantDiscriminatorColumn2_3 addSpecifiedTenantDiscriminatorColumn(int index) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public void removeSpecifiedTenantDiscriminatorColumn(TenantDiscriminatorColumn2_3 tenantDiscriminatorColumn) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public void removeSpecifiedTenantDiscriminatorColumn(int index) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public void moveSpecifiedTenantDiscriminatorColumn(int targetIndex, int sourceIndex) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public ListIterable<JavaVirtualTenantDiscriminatorColumn2_3> getDefaultTenantDiscriminatorColumns() { |
| return EmptyListIterable.instance(); |
| } |
| |
| public int getDefaultTenantDiscriminatorColumnsSize() { |
| return 0; |
| } |
| |
| public TextRange getValidationTextRange(CompilationUnit astRoot) { |
| throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$ |
| } |
| |
| public boolean specifiedTenantDiscriminatorColumnsAllowed() { |
| return false; |
| } |
| } |