Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/orm/AbstractEntityMappingsDetailsPage.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/orm/AbstractEntityMappingsDetailsPage.java259
1 files changed, 0 insertions, 259 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/orm/AbstractEntityMappingsDetailsPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/orm/AbstractEntityMappingsDetailsPage.java
deleted file mode 100644
index f5bd890953..0000000000
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/details/orm/AbstractEntityMappingsDetailsPage.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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.ui.internal.details.orm;
-
-import java.util.Collection;
-
-import org.eclipse.jpt.core.context.AccessType;
-import org.eclipse.jpt.core.context.orm.EntityMappings;
-import org.eclipse.jpt.core.context.orm.PersistenceUnitMetadata;
-import org.eclipse.jpt.db.SchemaContainer;
-import org.eclipse.jpt.ui.WidgetFactory;
-import org.eclipse.jpt.ui.internal.JpaHelpContextIds;
-import org.eclipse.jpt.ui.internal.details.AbstractJpaDetailsPage;
-import org.eclipse.jpt.ui.internal.details.db.CatalogCombo;
-import org.eclipse.jpt.ui.internal.details.db.SchemaCombo;
-import org.eclipse.jpt.ui.internal.widgets.EnumFormComboViewer;
-import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel;
-import org.eclipse.jpt.utility.model.value.PropertyValueModel;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Here the layout of this pane:
- * <pre>
- * -----------------------------------------------------------------------------
- * | ------------------------------------------------------------------------- |
- * | | | |
- * | | XmlPackageChooser | |
- * | | | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------ |
- * | Schema: | SchemaCombo | |
- * | ------------------------------------------------------------ |
- * | ------------------------------------------------------------ |
- * | Catalog: | CatalogCombo | |
- * | ------------------------------------------------------------ |
- * | ------------------------------------------------------------ |
- * | Access Type: | |v| |
- * | ------------------------------------------------------------ |
- * | |
- * | ------------------------------------------------------------------------- |
- * | | | |
- * | | PersistenceUnitMetadataComposite | |
- * | | | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | | | |
- * | | OrmGeneratorsComposite | |
- * | | | |
- * | ------------------------------------------------------------------------- |
- * | ------------------------------------------------------------------------- |
- * | | | |
- * | | OrmQueriesComposite | |
- * | | | |
- * | ------------------------------------------------------------------------- |
- * -----------------------------------------------------------------------------</pre>
- *
- * @see EntityMappings
- * @see AbstractEntityMappingsDetailsPage - The parent container
- * @see CatalogCombo
- * @see EnumFormComboViewer
- * @see EntityMappingsGeneratorsComposite
- * @see OrmPackageChooser
- * @see OrmQueriesComposite
- * @see PersistenceUnitMetadataComposite
- * @see SchemaCombo
- *
- * @version 2.2
- * @since 2.0
- */
-public abstract class AbstractEntityMappingsDetailsPage extends AbstractJpaDetailsPage<EntityMappings>
-{
- /**
- * Creates a new <code>EntityMappingsDetailsPage</code>.
- *
- * @param parent The parent container
- * @param widgetFactory The factory used to create various common widgets
- */
- protected AbstractEntityMappingsDetailsPage(Composite parent,
- WidgetFactory widgetFactory) {
-
- super(parent, widgetFactory);
- }
-
- protected EnumFormComboViewer<EntityMappings, AccessType> addAccessTypeCombo(Composite container) {
-
- return new EnumFormComboViewer<EntityMappings, AccessType>(this, container) {
-
- @Override
- protected void addPropertyNames(Collection<String> propertyNames) {
- super.addPropertyNames(propertyNames);
- propertyNames.add(EntityMappings.DEFAULT_ACCESS_PROPERTY);
- propertyNames.add(EntityMappings.SPECIFIED_ACCESS_PROPERTY);
- }
-
- @Override
- protected AccessType[] getChoices() {
- return AccessType.values();
- }
-
- @Override
- protected AccessType getDefaultValue() {
- return getSubject().getDefaultAccess();
- }
-
- @Override
- protected String displayString(AccessType value) {
- return value == AccessType.FIELD ?
- JptUiDetailsOrmMessages.EntityMappingsDetailsPage_field :
- JptUiDetailsOrmMessages.EntityMappingsDetailsPage_property;
- }
-
- @Override
- protected AccessType getValue() {
- return getSubject().getAccess();
- }
-
- @Override
- protected void setValue(AccessType value) {
- getSubject().setSpecifiedAccess(value);
- }
- };
- }
-
- protected CatalogCombo<EntityMappings> addCatalogCombo(Composite container) {
-
- return new CatalogCombo<EntityMappings>(this, container) {
-
- @Override
- protected void addPropertyNames(Collection<String> propertyNames) {
- super.addPropertyNames(propertyNames);
- propertyNames.add(EntityMappings.DEFAULT_CATALOG_PROPERTY);
- propertyNames.add(EntityMappings.SPECIFIED_CATALOG_PROPERTY);
- }
-
- @Override
- protected String getDefaultValue() {
- return getSubject().getDefaultCatalog();
- }
-
- @Override
- protected void setValue(String value) {
- getSubject().setSpecifiedCatalog(value);
- }
-
- @Override
- protected String getValue() {
- return getSubject().getSpecifiedCatalog();
- }
- };
- }
-
- protected PropertyValueModel<PersistenceUnitMetadata> buildPersistentUnitMetadataHolder() {
- return new TransformationPropertyValueModel<EntityMappings, PersistenceUnitMetadata>(getSubjectHolder()) {
- @Override
- protected PersistenceUnitMetadata transform_(EntityMappings value) {
- return value.getPersistenceUnitMetadata();
- }
- };
- }
-
- protected SchemaCombo<EntityMappings> addSchemaCombo(Composite container) {
-
- return new SchemaCombo<EntityMappings>(this, container) {
-
- @Override
- protected void addPropertyNames(Collection<String> propertyNames) {
- super.addPropertyNames(propertyNames);
- propertyNames.add(EntityMappings.DEFAULT_SCHEMA_PROPERTY);
- propertyNames.add(EntityMappings.SPECIFIED_SCHEMA_PROPERTY);
- }
-
- @Override
- protected String getDefaultValue() {
- return getSubject().getDefaultSchema();
- }
-
- @Override
- protected void setValue(String value) {
- getSubject().setSpecifiedSchema(value);
- }
-
- @Override
- protected String getValue() {
- return getSubject().getSpecifiedSchema();
- }
-
- @Override
- protected SchemaContainer getDbSchemaContainer_() {
- return this.getSubject().getDbSchemaContainer();
- }
-
- };
- }
-
- /*
- * (non-Javadoc)
- */
- @Override
- protected void initializeLayout(Composite container) {
-
- // Package widgets
- new OrmPackageChooser(this, container);
-
- // Schema widgets
- addLabeledComposite(
- container,
- JptUiDetailsOrmMessages.EntityMappingsDetailsPage_schema,
- addSchemaCombo(container),
- JpaHelpContextIds.ENTITY_ORM_SCHEMA
- );
-
- // Catalog widgets
- addLabeledComposite(
- container,
- JptUiDetailsOrmMessages.EntityMappingsDetailsPage_catalog,
- addCatalogCombo(container),
- JpaHelpContextIds.ENTITY_ORM_CATALOG
- );
-
- // Access Type widgets
- addLabeledComposite(
- container,
- JptUiDetailsOrmMessages.EntityMappingsDetailsPage_access,
- addAccessTypeCombo(container),
- JpaHelpContextIds.ENTITY_ORM_ACCESS
- );
-
- // Persistence Unit Metadata widgets
- new PersistenceUnitMetadataComposite(
- this,
- buildPersistentUnitMetadataHolder(),
- addSubPane(container, 5)
- );
-
- // Generators pane
- this.buildEntityMappingsGeneratorsComposite(container);
-
- // Queries pane
- this.buildOrmQueriesComposite(container);
- }
-
- protected void buildEntityMappingsGeneratorsComposite(Composite container) {
- new EntityMappingsGeneratorsComposite(
- this,
- container
- );
- }
-
- protected void buildOrmQueriesComposite(Composite container) {
- new OrmQueriesComposite(this, container);
- }
-} \ No newline at end of file

Back to the top