Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.ui.details
Interface MappingUiDefinition

All Known Subinterfaces:
DefaultMappingUiDefinition

public interface MappingUiDefinition

A mapping UI definition provides the label and image descriptor for the (type or attribute) mapping type indicated by getKey().

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Since:
2.0

Nested Class Summary
static class MappingUiDefinition.ImageDescriptorTransformer
           
static class MappingUiDefinition.KeyTransformer
           
static class MappingUiDefinition.LabelTransformer
           
static class MappingUiDefinition.NullComposite
           
 
Field Summary
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingUiDefinition,ImageDescriptor> IMAGE_DESCRIPTOR_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingUiDefinition,String> KEY_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingUiDefinition,String> LABEL_TRANSFORMER
           
 
Method Summary
 JpaComposite buildMappingComposite(JpaUiFactory factory, PropertyValueModel<? extends JpaContextNode> nodeModel, PropertyValueModel<Boolean> enabledModel, Composite parentComposite, WidgetFactory widgetFactory, ResourceManager resourceManager)
          Create a JPA composite corresponding to the definition's mapping type.
 ImageDescriptor getImageDescriptor()
          Return an image descriptor corresponding to the mapping type.
 String getKey()
          Return a key corresponding to the mapping's key.
 String getLabel()
          Return a string corresponding to the mapping type.
 String getLinkLabel()
          Return a string that corresponds to the mapping type and can be used in the mapping change link label.
 boolean isEnabledFor(JpaContextNode node)
          Return whether the ui represented by this definition is enabled for the given node.
 

Field Detail

KEY_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingUiDefinition,String> KEY_TRANSFORMER

LABEL_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingUiDefinition,String> LABEL_TRANSFORMER

IMAGE_DESCRIPTOR_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingUiDefinition,ImageDescriptor> IMAGE_DESCRIPTOR_TRANSFORMER
Method Detail

getKey

String getKey()
Return a key corresponding to the mapping's key.

See Also:
JavaTypeMappingDefinition.getKey(), JavaAttributeMappingDefinition.getKey(), OrmTypeMappingDefinition.getKey(), OrmAttributeMappingDefinition.getKey()

getLabel

String getLabel()
Return a string corresponding to the mapping type.


getLinkLabel

String getLinkLabel()
Return a string that corresponds to the mapping type and can be used in the mapping change link label.


buildMappingComposite

JpaComposite buildMappingComposite(JpaUiFactory factory,
                                   PropertyValueModel<? extends JpaContextNode> nodeModel,
                                   PropertyValueModel<Boolean> enabledModel,
                                   Composite parentComposite,
                                   WidgetFactory widgetFactory,
                                   ResourceManager resourceManager)
Create a JPA composite corresponding to the definition's mapping type. This will be displayed by the JPA details view when the mapping key matches the definition's key.


getImageDescriptor

ImageDescriptor getImageDescriptor()
Return an image descriptor corresponding to the mapping type.


isEnabledFor

boolean isEnabledFor(JpaContextNode node)
Return whether the ui represented by this definition is enabled for the given node. This is almost always true.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.