diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java deleted file mode 100644 index ea927610de..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 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.core.internal.platform; - -import org.eclipse.jpt.core.JpaFacet; -import org.eclipse.jpt.core.JpaPlatform; -import org.eclipse.jpt.core.JpaPlatformFactory; -import org.eclipse.jpt.core.internal.XPointUtil; -import org.eclipse.jpt.core.platform.JpaPlatformDescription; -import org.eclipse.jpt.core.platform.JpaPlatformGroupDescription; -import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; - -public class JpaPlatformDescriptionImpl - implements JpaPlatformDescription { - - private String id; - private String pluginId; - private String label; - private String factoryClassName; - private IProjectFacetVersion jpaFacetVersion; - private boolean default_ = false; - private JpaPlatformGroupDescriptionImpl group; - - - public String getId() { - return this.id; - } - - void setId(String id) { - this.id = id; - } - - public String getPluginId() { - return this.pluginId; - } - - void setPluginId(String pluginId) { - this.pluginId = pluginId; - } - - public String getLabel() { - return this.label; - } - - void setLabel(String label) { - this.label = label; - } - - public String getFactoryClassName() { - return this.factoryClassName; - } - - void setFactoryClassName(String className) { - this.factoryClassName = className; - } - - public IProjectFacetVersion getJpaFacetVersion() { - return this.jpaFacetVersion; - } - - void setJpaFacetVersion(IProjectFacetVersion jpaFacetVersion) { - if (! jpaFacetVersion.getProjectFacet().equals(JpaFacet.FACET)) { - throw new IllegalArgumentException(jpaFacetVersion.toString()); - } - this.jpaFacetVersion = jpaFacetVersion; - } - - public boolean supportsJpaFacetVersion(IProjectFacetVersion jpaFacetVersion) { - if (! jpaFacetVersion.getProjectFacet().equals(JpaFacet.FACET)) { - throw new IllegalArgumentException(jpaFacetVersion.toString()); - } - return (this.jpaFacetVersion != null) ? this.jpaFacetVersion.equals(jpaFacetVersion) : true; - } - - public boolean isDefault() { - return this.default_; - } - - void setDefault(boolean default_) { - this.default_ = default_; - } - - public JpaPlatformGroupDescription getGroup() { - return this.group; - } - - void setGroup(JpaPlatformGroupDescriptionImpl group) { - this.group = group; - } - - public JpaPlatform buildJpaPlatform() { - JpaPlatformFactory factory = (JpaPlatformFactory) XPointUtil.instantiate( - this.pluginId, JpaPlatformManagerImpl.QUALIFIED_EXTENSION_POINT_ID, - this.factoryClassName, JpaPlatformFactory.class); - return factory.buildJpaPlatform(getId()); - } - - @Override - public String toString() { - return this.label; - } -} |